2017-09-28 10 views
0

これは新しいubuntu ec2ボックスのsudoersファイルです。 sudo suにまだパスワードが必要なのはなぜですか?なぜsudoにパスワードを尋ねることができないのですか?

# 
# 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_reset 
Defaults  mail_badpass 
Defaults  secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" 

# Host alias specification 

# User alias specification 

# Cmnd alias specification 

# User privilege specification 
root ALL=(ALL:ALL) PASSWD:ALL 

# Members of the admin group may gain root privileges 
%admin ALL=(ALL) PASSWD:ALL 

# Allow members of group sudo to execute any command 
%sudo ALL=(ALL:ALL) PASSWD:ALL 

# See sudoers(5) for more information on "#include" directives: 

#includedir /etc/sudoers.d 

何らかの遅延がありますか?あなたはbashrcファイルと同じような "ソース"または同様のものを想定していますか? sudo suがパスワードを要求するのはなぜ難しいですか?

EDIT: thisパーリンク、ランニング:

sudo passwd ubuntu 
sudo perl -pi -e 's/^(ubuntu.*)NOPASSWD:(.*)/$1$2/' /etc/sudoers 

が動作しない、またそれもsudoersファイルを変更しません。

答えて

0

は3箇所

# User privilege specification 
root ALL=(ALL:ALL) 

# Members of the admin group may gain root privileges 
%admin ALL=(ALL) 

# Allow members of group sudo to execute any command 
%sudo ALL=(ALL:ALL) 
を以下に PASSWD:ALLを削除してみてください
関連する問題