PiSi
Posts: 37
Joined: Mon Jan 14, 2013 9:41 am

New user given sudo access but need to enter a password

Sun Jan 20, 2013 3:30 pm

Added a new user and included adding them to the sudo group.

When I am logged in as this user and run a sudo command it asks for the password first time and then runs the following sudo commands without a password.

Never had this for the default 'Pi' user.

Why has this now come up - do I need to add this new user to sudo in another way?

Thanks,

Simon

lude
Posts: 9
Joined: Sun Jan 06, 2013 4:53 pm

Re: New user given sudo access but need to enter a password

Sun Jan 20, 2013 4:35 pm

Sudo is simply asking you for that user's password, not the root password. It's just how sudo works. You can change this behavior by running visudo and changing the line:

Code: Select all

%sudo	ALL=(ALL) ALL
to

Code: Select all

%sudo	ALL=(ALL) NOPASSWD: ALL
Though it's a little less secure that way.

buteman
Posts: 132
Joined: Tue Jul 03, 2012 9:06 am
Location: Barrow upon Humber

Re: New user given sudo access but need to enter a password

Mon Jan 21, 2013 2:51 pm

Are you sure it only asks for the password once?
The reason I ask is that I have used linux for years and what has always happened is that sudo asks for your password first time and then allows you do continue for a short time - usually about 15 minutes - without asking for a password.
Each time you run a command within that timeout period the timeout starts from zero but once you have left it more than the timeout period it will ask for the password and start a new timeout period.
There are few rewards greater than accomplishing a difficult task. Just because something doesn't cost money doesn't mean there is no cost. Every success makes the next one easier. Of course that takes determination and patience.

PiSi
Posts: 37
Joined: Mon Jan 14, 2013 9:41 am

Re: New user given sudo access but need to enter a password

Mon Jan 21, 2013 2:57 pm

From what I recall, but could be because it was within the timeout limit. Sounds about right though.

Simon
buteman wrote:Are you sure it only asks for the password once?
The reason I ask is that I have used linux for years and what has always happened is that sudo asks for your password first time and then allows you do continue for a short time - usually about 15 minutes - without asking for a password.
Each time you run a command within that timeout period the timeout starts from zero but once you have left it more than the timeout period it will ask for the password and start a new timeout period.

Return to “General discussion”