I found an article http://superuser.com/questions/611511/how-to-launch-sshuttle-without-superuser-pwd-prompt, but when I try ps auxwww |grep sud, I get different output:
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
So I tried to replace
/usr/bin/python /usr/share/sshuttle/main.py /usr/bin/python -v --firewall 12300 0
with my case:
PYTHONPATH=/usr/lib/python3/dist-packages -- /usr/bin/python3 /usr/bin/sshuttle --method auto --firewall
When I finished editing,visudo says my grammar is wrong; what's my mistake and how to get the things done?
visudois unhappy about. My guess would be that you should not include the setting of PYTHONPATH.Cmnd_Alias SSHUTTLE = /usr/bin/python3 /usr/bin/sshuttle --method auto --firewalliucmr ALL=(root) NOPASSWD: SSHUTTLEiucmr@ricn:~$ sshuttle -r [email protected] 0/0 --dns -x 111.111.111.111 --python '/usr/bin/python3.6' 'sudo: sorry, you are not allowed to set the following environment variables: PYTHONPATH fatal: ['sudo', '-p', '[local sudo] Password: ', 'PYTHONPATH=/usr/lib/python3/dist-packages', '--', '/usr/bin/python3', '/usr/bin/sshuttle', '--method', 'auto', '--firewall'] returned 1iucmr@ricn:~$ sshuttle -r [email protected] 0/0 --dns -x 111.111.111.111 --python '/usr/bin/python3.6'sudo: sorry, you are not allowed to set the following environment variables: PYTHONPATH fatal: ['sudo', '-p', '[local sudo] Password: ', 'PYTHONPATH=/usr/lib/python3/dist-packages', '--', '/usr/bin/python3', '/usr/bin/sshuttle', '--method', 'auto', '--firewall'] returned 1