- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Identifying scripts using remsh
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2006 10:54 PM
12-10-2006 10:54 PM
I'm now trying to locate all scripts that make use of remsh so I can edit them. Has anyone found a clever of way of locating all scripts.
I am worried that I will shutdown 'r' services but then find I have missed a script.
Berd
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2006 11:06 PM
12-10-2006 11:06 PM
Re: Identifying scripts using remsh
find /starting_directory -type f -exec grep -l "remsh" {} \;
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2006 11:07 PM
12-10-2006 11:07 PM
SolutionI'd use 'find' and 'grep' for "remsh".
Keep your 'find' from crossing mountpoints with '-xdev'. This is very useful if you search the root ('/') directory. Afterall, you *want* to search '/sbin' and '/etc/' but don't want nor need to traverse '/var' or '/tmp'.
The following shell script limits examination to text files eliminating searching binary ones:
# cat .finder
#!/usr/bin/sh
typeset DIR=$1
typeset PAT=$2
find ${DIR} -xdev -type f | while read FILE
do
[ `file ${FILE} | grep -c ascii` -eq 0 ] && continue
grep "$PAT" ${FILE} /dev/null
done
exit 0
...run as:
# ./finder /path_to_search pattern_to_find
for example:
# ./finder / remsh
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2006 11:08 PM
12-10-2006 11:08 PM
Re: Identifying scripts using remsh
One good way would be to go to each directory where you keep your scripts and do a:
grep -i remsh *.sh
otherwise, you can just go to all the other hosts and run:
last | grep rmeshd
though this does not give you the name of the script, you will know that there are still scripts that have been left out!
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2006 11:09 PM
12-10-2006 11:09 PM
Re: Identifying scripts using remsh
check the wtmp log file (last | grep remshd) then concentrate on those users and times of access.
Or you could try to get the daemon to log access. Look at /etc/inetd.conf.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2006 11:25 PM
12-10-2006 11:25 PM
Re: Identifying scripts using remsh
I think I will use the find command with the xdev flag. I'll work on one mount point at a time per host.
Cheers,
Berd