Dieses Problem nervt mich jetzt schon eine Weile.
Hin und wieder muss ich eine Skriptdatei schreiben, die sudoBefehle ausführen soll . Ich weiß nicht unbedingt im Voraus, dass ich so laufen werde, sudodaher bin ich sicher, dass es eine Möglichkeit gibt, eine schöne grafische Oberfläche zu öffnen (wie die, die bei der Installation von Software auftaucht), aber wie?
Der man sudosagt:
-A Normally, if sudo requires a password, it will read it from the current terminal. If the -A (askpass) option is specified, a (possibly
graphical) helper program is executed to read the user's password and output the password to the standard output. If the SUDO_ASKPASS
environment variable is set, it specifies the path to the helper program. Otherwise, the value specified by the askpass option in
sudoers(5) is used
Ich bin mir also ziemlich sicher, dass die Lösung darin liegt -Aund SUDO_ASKPASSTupel, aber ich habe es geschafft, herauszufinden, was ich in diese einbauen kann.
gtksudooder behandeltkdesudo. Ich weiß nicht, was es auf der OS-X-Seite gibt, aber ich gehe davon aus, dass Sie nach etwas in dieser Richtung suchen.