I want to run any program without asking root password. Because I'm the only person who use the system. So I googled and edited /etc/sudoers
.
What I did:
# chmod 640 /etc/sudoers
# vim /etc/sudoers
Added a line like below:
# User privilege specification
root ALL=(ALL:ALL) ALL
sgg ALL=(ALL:ALL) ALL
saved and closed the file. Rebooted system. But no change/improvement. Am I want to change any other lines? or Is there any way?
EDIT:
1.I changed permissions /etc/sudoers
to 0440
. ls -l /etc/sudoers
result is
-r--r----- 1 root root 772 May 4 19:43 /etc/sudoers
2.I run # visudo
. File content is
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
sgg ALL=NOPASSWD:ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
But still it asking for password when I run sudo ls
.
System Info: Ubuntu 14.04 x86_64 3.13.0-24-generic
vim /etc/sudoers
, usevisudo
– guido May 04 '14 at 10:09