sudo sshuttle パスワードなし

sudo sshuttle パスワードなし

記事を見つけました。http://superuser.com/questions/611511/how-to-launch-sshuttle-without-superuser-pwd-promptしかし、試してみると、ps auxwww |grep sud他の結果が表示されます。

root      2846  0.0  0.1  79104  4328 pts/0    S+   08:27   0:00 sudo -p [local sudo] Password:  PYTHONPATH=/usr/lib/python3/dist-packages -- /usr/bin/python3 /usr/bin/sshuttle --method auto --firewall

だから交換しよう

/usr/bin/python /usr/share/sshuttle/main.py /usr/bin/python -v --firewall 12300 0

私の場合:

PYTHONPATH=/usr/lib/python3/dist-packages -- /usr/bin/python3 /usr/bin/sshuttle --method auto --firewall

編集が終わったら、visudoで構文エラーが発生したと言います。エラーは何であり、これらのタスクを実行するにはどうすればよいですか?

ベストアンサー1

それはすべて...

# 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"
Defaults        env_keep += PYTHONPATH

# Host alias specification

# User alias specification

# Cmnd alias specification
Cmnd_Alias SSHUTTLE =  /usr/bin/python3 , /usr/bin/sshuttle --method auto --firewall

# User privilege specification
root    ALL=(ALL:ALL) ALL
your_username    ALL=(ALL) NOPASSWD: SSHUTTLE

# 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

おすすめ記事