14.04 здесь. Я загрузился в свою машину, добавил следующую строку в /etc/sudoers
:
myuser ALL=NOPASSWD: ALL
А потом попробовал бежать:
sudo mkdir /etc/blah
...и у меня спрашивают мой пароль. Почему?!?
Я делаю нет хочу, чтобы при выполнении этой операции у меня спрашивали пароль. Пожалуйста, обратите внимание, что когда я запускаю ls -ltr /
Я получаю:
drwxr-xr-x 94 root root 4096 Jul 30 13:28 etc
Но я не думаю, что это имеет значение, потому что я настроил себя как "sudoer", верно?
Что еще более важно, что мне нужно сделать, чтобы я мог работать sudo mkdir /etc/blah
как мой текущий пользователь (myuser
) без запроса пароля?
Вот весь мой /etc/sudoers
файл:
## This file MUST be edited with the 'visudo' command as root.## Please consider adding local content in /etc/sudoers.d/ instead of# directly modifying this file.## See the man page for details on how to write a sudoers file.#Defaults env_resetDefaults mail_badpassDefaults 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 specificationroot ALL=(ALL:ALL) ALLfizzbuzz ALL=NOPASSWD: ALLchadmin 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# See sudoers(5) for more information on "#include" directives:#includedir /etc/sudoers.d