- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- sudoer question - trying to set user to only be a...
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
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
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
05-04-2012 04:03 PM
05-04-2012 04:03 PM
sudoer question - trying to set user to only be allowed to issue one command
I only want to script and give a user the ability to reset passwords of other users. I am testing with a simple script which run only two passwd commands to reset user2.
Of course when I set sodoers up the script the simple script works.
user1 ALL=NOPASSWD: ALL
But I do not want to leave it set up as ALL
But when I set up sodoers like this, the simple script prompts for user2 password. Can anyone see what else needs to be changed to allow someone not to get prompted for password when changes another user with the passwd command?
Helpless ALL=NOPASSWD: /sbin/passwd
- Tags:
- Password reset
- sudo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2012 12:48 AM
05-06-2012 12:48 AM
Re: sudoer question - trying to set user to only be allowed to issue one command
I have replied to your similar type question in an another thread.
You can configure RBAC (Role Based Access Control) for achieving this.
Thanks and Regards,
Manoj K
Manoj K
- Tags:
- RBAC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2012 12:12 AM
05-07-2012 12:12 AM
Re: sudoer question - trying to set user to only be allowed to issue one command
For the NOPASSWD: to work, the command pathname must match exactly to the command that actually gets used.
/sbin/passwd is a simplified, statically linked version for single-user mode and other rescue situations, while /usr/bin/passwd is the one with the full functionality.
If your script specifies the command simply as "sudo passwd" with no pathname, the default PATH setting will cause the system to use /usr/bin/passwd instead of /sbin/passwd. You can confirm this by looking at the log messages sudo is producing (normally in /var/adm/syslog/syslog.log).
Change your sudoers line to:
user1 ALL=NOPASSWD: /usr/bin/passwd
... and try again.
Of course RBAC is a valid solution too, but I think it is important to understand what was wrong with your original attempt.