- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: sudo problem
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
03-03-2009 06:26 AM
03-03-2009 06:26 AM
Cmnd_Alias ADMINS=/usr/sbin/useradd
root ALL=NOPASSWD:ALL
%sysadmin ALL=NOPASSWD:ALL
%oper ALL=NOPASSWD:ALL
~
user1 root=NOPASSWD:ADMINS
But here's what i am getting ....
$ whoami
user1
$ /usr/sbin/useradd -g general -m user2
Permission Denied
....i have tried googling ...but not working.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 06:30 AM
03-03-2009 06:30 AM
Re: sudo problem
$ sudo /usr/sbin/useradd -g general -m user2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 06:30 AM
03-03-2009 06:30 AM
Re: sudo problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 06:32 AM
03-03-2009 06:32 AM
Re: sudo problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 06:33 AM
03-03-2009 06:33 AM
Re: sudo problem
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=997812
Please assign points to this threads !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 06:37 AM
03-03-2009 06:37 AM
Re: sudo problem
$ /usr/local/bin/sudo /usr/sbin/useradd -g general -m user2
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
Password:
Sorry, try again.
Password:
Sorry, try again.
Password:
..................and the passwd is correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 06:42 AM
03-03-2009 06:42 AM
Re: sudo problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 06:45 AM
03-03-2009 06:45 AM
Re: sudo problem
The password you use is the password of the ID you are logged in as. In this case the password of user1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 06:50 AM
03-03-2009 06:50 AM
Re: sudo problem
I ahve tried both the passwd , for uer1 and root .not the mesasage is
Last successful login for user1: Tue Mar 3 18:17:31 oman-4 2009
Last unsuccessful login for user1: Tue Mar 3 18:46:50 oman-4 2009 on pts/0
user1 is not allowed to run sudo on mwdev1. This incident will be reported.
.....the system is trusted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 07:07 AM
03-03-2009 07:07 AM
Re: sudo problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 07:08 AM
03-03-2009 07:08 AM
Re: sudo problem
Try and let me know
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 07:10 AM
03-03-2009 07:10 AM
Re: sudo problem
sudo -l
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 07:14 AM
03-03-2009 07:14 AM
Re: sudo problem
It seems that you don't need to use password for the whole thing.
Maybe you can try:
sudo -u root -c "/usr/sbin/useradd -g general -m user2"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 07:15 AM
03-03-2009 07:15 AM
Re: sudo problem
I have always assigned points , you can look into profile.I think i have to get the user1 account enabled in sudo now .....there's the message......Last unsuccessful login for user1: Tue Mar 3 18:46:50 xyz-4 2009 on pts/0
user1 is not allowed to run sudo on xyz. This incident will be reported.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 07:51 AM
03-03-2009 07:51 AM
Re: sudo problem
Avinash : after , user1 root = NOPASSWD :/usr/bin/useradd : problem persists
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 08:06 AM
03-03-2009 08:06 AM
Re: sudo problem
Also, did you create the sudoers file by visudo, which will check the syntax of the file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 08:14 AM
03-03-2009 08:14 AM
Re: sudo problem
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=997812
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 08:18 AM
03-03-2009 08:18 AM
Re: sudo problem
i have alredy posted above the content of that file above .
here's o/p of sudo -v
/usr/local/bin/sudo -v
Sorry, user user1 may not run sudo on xyz.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 08:23 AM
03-03-2009 08:23 AM
Re: sudo problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 08:27 AM
03-03-2009 08:27 AM
Re: sudo problem
I wanted you to check only the first two notes in the thread
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 08:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2009 08:14 PM
03-03-2009 08:14 PM
Re: sudo problem
Efforts by Avinash and Tingli were also of great help ,Thanks a lot man.
Solution : user1 ALL=(root) NOPASSWD: ADMINS , was the correct entry that needs to be put in to the /usr/local/sbin/visudo file.