sudo sshuttle без пароля

Вы можете использовать команду breakследующим образом:

while true; do
   ./Server
    if [ -e filename.txt ] ; then
        break
    fi
done

Но приведенный выше скрипт будет выполняться все время ./Server, что может быть опасно

2
14.08.2019, 16:45
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
1
27.01.2020, 22:24

Теги

Похожие вопросы