KeyHelp Firewall "sudo: no tty present and no askpass program specified"
Posted: Wed 9. Dec 2020, 07:29
Moin zusammen,
ich wollte gerade auf einem Server die Firewall aktivieren und erhalte beim speichern folgende Meldung:
Auf dem Server läuft Debian 10 mit der aktuellsten KeyHekp Version.
Die Datei "/etc/sudoers.d/keyhelp" sieht erst einmal gut für mich aus:
In der "auth.log" erhalte ich diese Meldung
Bevor ich jetzt hier selbst rumschraube, wollte ich erst einmal nachfragen ob das ein bekanntes Problem ist.
Gruß
Sascha
ich wollte gerade auf einem Server die Firewall aktivieren und erhalte beim speichern folgende Meldung:
Code: Select all
Fehler beim Übernehmen der Firewall-Regeln.
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
sudo: no tty present and no askpass program specified
Die Datei "/etc/sudoers.d/keyhelp" sieht erst einmal gut für mich aus:
Code: Select all
# Manage system services
keyhelp ALL = (ALL) NOPASSWD: /usr/sbin/service
# Mail queue management
keyhelp ALL = (ALL) NOPASSWD: /usr/sbin/postsuper
# Server reboot
keyhelp ALL = (ALL) NOPASSWD: /sbin/reboot
# Process management
keyhelp ALL = (ALL) NOPASSWD: /bin/kill
# Disk usage
keyhelp ALL = (ALL) NOPASSWD: /usr/bin/du
keyhelp ALL = (ALL) NOPASSWD: /usr/bin/test
# Firewall
keyhelp ALL = (ALL) NOPASSWD: /usr/sbin/iptables, /sbin/iptables
keyhelp ALL = (ALL) NOPASSWD: /usr/sbin/iptables-restore, /sbin/iptables-restore
keyhelp ALL = (ALL) NOPASSWD: /usr/sbin/iptables-save, /sbin/iptables-save
keyhelp ALL = (ALL) NOPASSWD: /usr/sbin/ip6tables, /sbin/ip6tables
keyhelp ALL = (ALL) NOPASSWD: /usr/sbin/ip6tables-restore, /sbin/ip6tables-restore
keyhelp ALL = (ALL) NOPASSWD: /usr/sbin/ip6tables-save, /sbin/ip6tables-save
# Last line must be empty, do not trim!
Code: Select all
Dec 9 07:22:57 srv01 sudo: keyhelp : command not allowed ; TTY=unknown ; PWD=/home/keyhelp/www/keyhelp ; USER=root ; COMMAND=iptables-restore --test /tmp/keyhelp/firewall-config-ipv4
Gruß
Sascha