- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Securing su
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
Discussions
Discussions
Forums
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
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
тАО04-26-2001 11:41 PM
тАО04-26-2001 11:41 PM
Securing su
I have written a wrapper script which handles the authentication, however su fails under certain circumstances, yet returns no error e.g.
/usr/bin/su - iaa -c "/appl/iaa/bin/iaa &" > /dev/null 2>&1
yet it returns no error code.
My script calls su with: /usr/bin/su "$@"
Any ideas, or alternative su scripts?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2001 12:01 AM
тАО04-27-2001 12:01 AM
Re: Securing su
/usr/bin/su - iaa -c "/appl/iaa/bin/iaa &" > /dev/null 2>&1
The error code is probably being generated from the script your running under the -c option, and thus no error code returned to you. You need to capture the error code there, ie;
/usr/bin/su - iaa -c "/appl/iaa/bin/iaa 2>/tmp/err &" > /dev/null 2>&1
Then check /tmp/err afterwards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2001 09:47 PM
тАО05-02-2001 09:47 PM
Re: Securing su
My script works fine when executed from a regular shell, however, when I run it as part of a Serviceguard package, I get a usage error from "su". It all comes down to the single command:
su "$@" - That is "su" the original binary, and "$@" is just the command line parameters when the script was called. The command is:
su_script - iaa -c "/appl/iaa/bin/iaa &" > /dev/null 2>&1
It seems that the "" are being incorrectly parsed whilst in the background. So I get "-".... usage errors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2001 02:16 AM
тАО05-03-2001 02:16 AM
Re: Securing su
http://hpux.cs.utah.edu/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2001 02:29 AM
тАО05-03-2001 02:29 AM
Re: Securing su
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2001 07:45 AM
тАО05-03-2001 07:45 AM
Re: Securing su
sudo is designed, and works VERY well, for things exactly like this. You could have sudo set up for this in no time, but if you keep trying to solve this problem, then you may be a while.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2001 08:03 AM
тАО05-03-2001 08:03 AM
Re: Securing su
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-04-2001 12:34 PM
тАО05-04-2001 12:34 PM
Re: Securing su
Good Luck.