[sudo-users] tty vs Xsession shell

Michael codejodler at gmx.ch
Mon Feb 13 15:13:34 EST 2012

I have 

User_alias 	ADM = user
Host_alias 	THIS = machine.fredonet


Defaults 			env_reset
Defaults:fredo		rootpw	

and then

ADM  THIS  = ( root ) NOPASSWD: /etc/init.d/magic start

and it works from any terminal commandline as expected, without asking for password.

But when i use command 'sudo /etc/init.d/magic start &' from a X session desktop launcher button, it says (by mail) ...

2 incorrect password attempts ; TTY=tty1 ; PWD=/home/fredo ; USER=root ; COMMAND=/etc/init.d/magic start &

.. and the script did not launch. But what is the difference ?

More information about the sudo-users mailing list