LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Sudo Password Incorrect (https://www.linuxquestions.org/questions/linux-newbie-8/sudo-password-incorrect-802979/)

benjam1nrk 04-19-2010 10:13 PM

Sudo Password Incorrect
 
I have set up a new account, with a user name of Benjamin. I have added the following line using 'visudo': Benjamin ALL=(ALL) ALL, giving the new user name sudo ability.

However, when running a sudo command, while logged in with the user name 'Benjamin', I receive an incorrect password error. All works as expected when utilizing the line: Benjamin ALL=(ALL) NOPASSWD:ALL, as no password is required.

Yes, I am entering the password for user name 'Benjamin' and not that of the root account.

What am I missing? Thank you!

Carl Filby 04-20-2010 12:27 AM

Quote:

Originally Posted by benjam1nrk (Post 3941019)
I have set up a new account, with a user name of Benjamin. I have added the following line using 'visudo': Benjamin ALL=(ALL) ALL, giving the new user name sudo ability.

However, when running a sudo command, while logged in with the user name 'Benjamin', I receive an incorrect password error. All works as expected when utilizing the line: Benjamin ALL=(ALL) NOPASSWD:ALL, as no password is required.

Yes, I am entering the password for user name 'Benjamin' and not that of the root account.

What am I missing? Thank you!

Don't mean to sound smug but you did set a password for that account correct?

cola 04-20-2010 12:42 AM

Quote:

Originally Posted by benjam1nrk (Post 3941019)
I have set up a new account, with a user name of Benjamin. I have added the following line using 'visudo': Benjamin ALL=(ALL) ALL, giving the new user name sudo ability.

However, when running a sudo command, while logged in with the user name 'Benjamin', I receive an incorrect password error. All works as expected when utilizing the line: Benjamin ALL=(ALL) NOPASSWD:ALL, as no password is required.

Yes, I am entering the password for user name 'Benjamin' and not that of the root account.

What am I missing? Thank you!

Reset your password if you can't remember it.
Code:

sudo passwd Benjamin

PMP 04-20-2010 12:51 AM

I am a bit confused !!
You are specifying NOPASSWD:ALL, Why is this asking for a passwd?
AFAIK, NOPASSWD provides access without prompting for your password.

benjam1nrk 04-20-2010 10:37 AM

Quote:

Originally Posted by Carl Filby (Post 3941089)
Don't mean to sound smug but you did set a password for that account correct?

Yes, I set a password for the account.

Quote:

Originally Posted by cola (Post 3941104)
Reset your password if you can't remember it.
Code:

sudo passwd Benjamin

I already tried resetting the password for the account, still will not accept the new password.

Quote:

Originally Posted by PMP (Post 3941113)
I am a bit confused !!
You are specifying NOPASSWD:ALL, Why is this asking for a passwd?
AFAIK, NOPASSWD provides access without prompting for your password.

Exactly, I was making the point that the user has ability to SUDO when no password is required, but when a password is required the password itself is not accepted.

Carl Filby 04-20-2010 11:50 PM

A wise monkey once told that caps are bad for your hair. Create another account with all lowercases, mirror group memberships. Also if there is another account with same name only no caps set each password the same and try it again.

benjam1nrk 04-21-2010 06:54 AM

Quote:

Originally Posted by Carl Filby (Post 3942181)
A wise monkey once told that caps are bad for your hair. Create another account with all lowercases, mirror group memberships. Also if there is another account with same name only no caps set each password the same and try it again.

Was really hoping this was my problem, no luck.

Aside from simple user error on my part, are there any known software conflicts, shadow password conflicts, etc.. that may be causing my problems?

Carl Filby 04-22-2010 12:48 AM

Run "faillog --help" for proper syntax
GOAL: check the user account and see if account is password failure locked. If it is, reset counter for that account to "0".

jschiwal 04-22-2010 01:31 AM

After changing groups or editing sudoers, you may need to reboot for the changes to take effect.
IIRC, there is a command to reload groups but I don't remember it.

AlucardZero 04-22-2010 07:11 AM

Quote:

After changing groups or editing sudoers, you may need to reboot for the changes to take effect.
No you don't. Worst he has to do is log out and back in to get the new groups. Also see "newgrp".

"targetpw" is not set in your sudoers file, is it?


All times are GMT -5. The time now is 11:02 AM.