- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- wrapper scripts for unsecured protocols?
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
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
01-19-2012 12:14 PM
01-19-2012 12:14 PM
Hey;
I need to put wrapper scripts around rlogin/remsh/rexec, etc, to find the schmucks that are still using them. Unfortunately, the 'turn it off and see who screams' approach is politically unfeasible. The wrapper scripts for telnet/ftp work fine; I'm testing the one for rlogin and it's not working.
The script is very simple; Effectively, I copy /usr/bin/rlogin to /usr/bin/rlogin.cmd, then put logic into a script in /usr/bin/rlogin to track user, pid, and command line arguments.
The script kept coming up with errors and then, when I tried the copied rlogin command directly, I found that the script isn't the source of the problem.
when I execute /usr/bin/rlogin.cmd ${host} -l oleary
i get a usage error:
Usage: rlogin host [ ex ] [ -l username ] [ -8 ]
I can't be the first guy that's put wrappers around rlogin/remsh, etc. Anyone know what the secret is?
Any help, greatly appreciated.
Doug O'Leary
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2012 01:10 PM
01-19-2012 01:10 PM
SolutionApparently the remsh and rlogin (and assumably the rcp) commands cannot cope with being renamed.
What will work, I just tested it, is to create a directory like /usr/badcmds and make sure the permissions are the same as /usr/bin -- 555) and copy/move the commands to that directory which allows you to keep the original name.
Then point your script to /usr/badcmds/rlogin to invoke the real script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2012 01:25 PM
01-19-2012 01:25 PM
Re: wrapper scripts for unsecured protocols?
>when I execute /usr/bin/rlogin.cmd ${host} -l oleary
It fails for me too. This makes it obvious. :-)
rlogin(1) checks to make sure argv[0] has the name rlogin and if something else it assumes that's the host.
See rlogin(1): Remote Host Name As Command
It seems it only checks the basename so you can put the real rlogin in another subdirectory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2012 01:49 PM
01-19-2012 01:49 PM
Re: wrapper scripts for unsecured protocols?
Hey;
that was it! Thank you very much, gents! I'd like to think that I would have gotten to the solution myself eventually; however, these fine people here have me jumping through so many hoops it's hard to think straight.
Thanks again.
Doug O'Leary
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html