Antwort von
nach 2 Tagen
hilfreich
Re^3: 'shutdown -a ?
Hallo Nena,
Aber kannst Du mir
vielleicht auch noch sagen, was genau in
dieser Datei wie drin stehen muß? Gehört
da der Username, nie UID rein oder beides?
Und in welcher Form?
ganz einfach, eine Zeile=ein User
<code>
martin
nena
james
</code>
root muss da nicht drinstehen.
also, ich pinn hier mal ´nen ausschnitt der shutdown man-pages hin (leider nur in deutsch :-( ). Aber manchmal ist man ja schon froh, wenn man weiß in welcher Zeile des englischen Textes das steht was man sucht ;-) . Unten dann die Zusammenfassung...
<code>Access Control
Shutdown can be called from init(8) when the magic keys
CTRL-ALT-DEL are pressed, by creating an appropriate entry
in /etc/inittab. This means that everyone who has physical
access to the console keyboard can shut the system down.
To prevent this, shutdown can check to see if an autho
rized user is logged in on one of the virtual consoles. If
shutdown is called from init, it checks to see if the file
/etc/shutdown.allow is present. It then compares the
login names in that file with the list of people that are
logged in on a virtual console (from /var/run/utmp). Only
if one of those authorized users or root is logged in, it
will proceed. Otherwise it will write the message
shutdown: no authorized users logged in
to the (physical) system console. The format of /etc/shut
down.allow is one user name per line. Empty lines and com
ment lines (prefixed by a #) are allowed. Currently there
is a limit of 32 users in this file.
</code>
ich fasse mal zusammen:
Jeder darf mit Strg+Alt+Entf das System runterfahren. Aber: Sollte die Datei /etc/shutdow.allow existieren, dürfen das nur die User, die dort drinstehen. Das Format dieser Datei ist ein Username pro Zeile. Leere und auskommentierte Zeilen (beginnen mit #) sind erlaubt. Maximal 32 User dürfen dort drin stehen
Irgendwie nervt es nämlich, daß ich mich,
nur um die Kiste runterzufahren, noch
extra als root anmelden muß.
Musst Du doch nicht! Einfach ausloggen, den Affengriff machen und warten bis die BIOS-Meldungen erscheinen. Dann schnell ausschalten. Oder den Affengriff auf "halt" setzen, nicht auf "reboot":
/etc/inittab
<code># what to do when CTRL-ALT-DEL is pressed
ca::ctrlaltdel:/sbin/shutdown -r -t 4 now
</code>
statt "-r" dann "-h"
alles klor? ;-)
Tschüß,
.............. Jame~