I 'm admin unix junior ,and I want write a script batch to log off all users
from the server ,but before ,send to them a message informe them to save
data because the session gonna close
Please some suggestion
Thanks foe your help
>Please some suggestion
>Thanks foe your help
note: The init S should work on all modern unix systems with sysV style
init. It turns the system into single-user mode, killing all login processes
and shutting down networking.
If you just want to kill every interactive user process, you would have
to parse the output of ps, looking for processes owned by users and attached
to a tty. A good thing is to first send them the HUP signal, wait a few
seconds, then send the TERM signal, and after another short time, the KILL
See manpages: ps kill init wall nologin and sed, awk, grep and cut
2. Telnet Help!