Scriptproblem
Michael Ring
mring at ringnet.de
Tue Aug 27 14:13:02 CEST 2002
User ist www und ist auch mit Passwort eingerichtet in /etc/passwd.
Apache ist der aktuelleste aus der debian testing:
Server version: Apache/1.3.26 (Unix) Debian GNU/Linux
Server built: Jun 19 2002 12:00:21
>Console]
>> "/usr/bin/sudo /etc/init.d/adsl restart -u xxx -S xxx
>[Script]
>> "/usr/bin/sudo /etc/init.d/adsl restart -- -u xxx -S xxx"
>Ist der gewollt? Falsch abgetippt? Möglicher Fehler?
-- ist gewollt. Laut man sudo beendet -- z.b. die Pfadangabe und dahinter
wieder Optionen eingeben.
>versuch mal so was wie
>exec('usr/bin/sudo /etc/init.d/adsl restart -u xx -S xx
2>/tmp/sudo_err.log')
>Vielleicht gibt es in der datei ein Fehlerhinweis.
In /tmp/sudo_err.log steht:
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these two things:
#1) Respect the privacy of others.
#2) Think before you type.
Password:
Er versucht also ein passwort zu bekommen. OK. Aber warum taucht das nicht
in apache/error.log auf?
Und man sudo sagt:
-S The -S (stdin) option causes sudo to read the password
from standard input instead of the terminal device.
Also müsse ich doch mit -S xxx (wenn xxx das Passwort ist) das Script
starten können.
Oder hab ich was wichtiges übersehen?
MfG Michael
More information about the Linux
mailing list