HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- sudo help
Operating System - HP-UX
1827482
Members
2167
Online
109965
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
02-24-2003 12:23 PM
02-24-2003 12:23 PM
sudo help
How can I get this to work...
sudo su - user -c "command"
Thanks,
Steve
sudo su - user -c "command"
Thanks,
Steve
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2003 12:30 PM
02-24-2003 12:30 PM
Re: sudo help
Hi,
-u Option
The -u (user) option causes sudo to run the specified command as a user other than root. To specify a uid instead of a username, use #uid.
#sudo -u
Pls check this on-line manual link:
http://www.courtesan.com/sudo/man/sudo.html
Rgds.
-u Option
The -u (user) option causes sudo to run the specified command as a user other than root. To specify a uid instead of a username, use #uid.
#sudo -u
Pls check this on-line manual link:
http://www.courtesan.com/sudo/man/sudo.html
Rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2003 12:44 PM
02-24-2003 12:44 PM
Re: sudo help
Yeah. The -u option is not going to work. B/c I have a command executing another command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2003 02:19 AM
02-25-2003 02:19 AM
Re: sudo help
How about this in your sudoers file?
usera systema = (userb) /home/userb/myscript
So, usera on systema can run userb's myscript as userb.
You can also override the Runas_Spec:
usera systema = (userb) /home/userb/myscript, (userc) /home/userc/myscript
So, usera on systema can run userb's myscript as userb, and userc's myscript as userc.
Hope that makes sense. If not, have alook at more examples on the sudoers man page.
Col.
usera systema = (userb) /home/userb/myscript
So, usera on systema can run userb's myscript as userb.
You can also override the Runas_Spec:
usera systema = (userb) /home/userb/myscript, (userc) /home/userc/myscript
So, usera on systema can run userb's myscript as userb, and userc's myscript as userc.
Hope that makes sense. If not, have alook at more examples on the sudoers man page.
Col.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP