sudo with nopassw for some commands?
Craig Vine
craig at webafrica.co.za
Tue Jul 11 10:45:52 UTC 2006
Donatas G. wrote:
> anyone has any ideas on this?
>
> Donatas
>
> Donatas G. wrote:
>
>> I am in admin group on my computer, so i have full sudo rights, but I would
>> like to not be asked for a password when executing some commands.
>>
>> I added a user group line and a command group line to the default /etc/sudoers
>> file, but I am still asked for a password...
>>
>> What is it that I am doing wrong? see my sudoers file below. My user is "dg".
>>
>> =========================
>> # User alias specification
>>
>> User_Alias LIMITED = dg, sim
>>
>> # Cmnd alias specification
>> Cmnd_Alias ELEMENTARY = /usr/bin/pon, /usr/bin/poff, \
>> /sbin/halt, /sbin/reboot
>>
>> # Defaults
>>
>> Defaults !lecture,tty_tickets,!fqdn
>>
>> # User privilege specification
>> root ALL=(ALL) ALL
>>
>> LIMITED ALL = NOPASSWD: ELEMENTARY
>>
>> # Members of the admin group may gain root privileges
>> %admin ALL=(ALL) ALL
>> =========================
>>
>>
>
>
>
I have this in our Wiki :
Password Free Sudo
1. Edit /etc/sudoers as root (run: kdesu kate /etc/sudoers)
2. Add the following on a new line "username ALL=NOPASSWD: ALL" (replace
username with your login name)
3. Click Save and exit kate. All sudo commands will now run without
asking for your password.
*WARNING!!! While this does make life easier. it can also be potentially
dangerous, any malicious code or script could gain root access and cause
serious kak. USE AT OWN RISK!!!* (
I havn't tested it tho..
More information about the kubuntu-users
mailing list