1748021 Members
4866 Online
108757 Solutions
New Discussion юеВ

Re: sudo problem

 
SOLVED
Go to solution
Avinash20
Honored Contributor

Re: sudo problem

user1 root = NOPASSWD :/usr/bin/useradd

Try and let me know
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Avinash20
Honored Contributor

Re: sudo problem

Also ensure to check what privileges you are having via
sudo -l
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Tingli
Esteemed Contributor

Re: sudo problem

I am not sure....

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"
DeafFrog
Valued Contributor

Re: sudo problem

Dear Avinash ,

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.
FrogIsDeaf
DeafFrog
Valued Contributor

Re: sudo problem

Tingli : your suggested command showed problem in syntax
Avinash : after , user1 root = NOPASSWD :/usr/bin/useradd : problem persists
FrogIsDeaf
Tingli
Esteemed Contributor

Re: sudo problem

Take away the "-u root".

Also, did you create the sudoers file by visudo, which will check the syntax of the file?
Avinash20
Honored Contributor

Re: sudo problem

Refer
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=997812
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
DeafFrog
Valued Contributor

Re: sudo problem

Yes Tingli , i have created that via visudo ,
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.
FrogIsDeaf
DeafFrog
Valued Contributor

Re: sudo problem

Avinash ,the thread you posted suggested restricted sam as option.But there has to be a solution to this , i have tried setting up RBACK also ...may be towmarrow will be a good day
FrogIsDeaf
Avinash20
Honored Contributor

Re: sudo problem

"the thread you posted suggested restricted sam as option"

I wanted you to check only the first two notes in the thread
"Light travels faster than sound. That's why some people appear bright until you hear them speak."