'su' without password

Smoot Carl-Mitchell smoot at tic.com
Wed Feb 18 23:06:54 UTC 2009


On Wed, 2009-02-18 at 12:58 +0100, Pol wrote:
> How to let user1 'su' user2, without entering password?

You cannot do that with 'su'.  You can do it with "sudo".  Add a line
like this to the sudoers file:

user1 ALL=(user2)NOPASSWD: ALL

Then user1 can run a command as user2 by typing:

sudo -u user2 command args ...

For a shell as user2 the command would be:

sudo -u user2 -i

See "man sudoers" for all the gory details.
-- 
Smoot Carl-Mitchell
Computer Systems and
Network Consultant
smoot at tic.com
+1 480 922 7313
cell: +1 602 421 9005




More information about the ubuntu-users mailing list