root account: how to log off all existing sessions
I am logged in as root on a RHEL5.3 machine. There are several other users logged in, I need to log everyone off to install some updates. What is the easiest way to do this?
thanks, Fabrizio |
Use the who command to see list of logged in users and
Code:
pkill -KILL -u username |
Take a look at command skill from the procps package. However, take in mind that using wall before skill to advice users to logout is fair and can prevent data losses. Every time I need to do some administrative tasks, I schedule the downtime at least two or three days in advance and I notify all the users by e-mail. In this way they don't ever login at the scheduled time/day.
|
kill -9 echo$(lsof -t -u <username>)
Or pkill -9 -u <username> any of this should work |
Yep, give then decent warning, both email (long term) and wall (short term ie minutes) then switch to single user mode
telinit 1 |
All times are GMT -5. The time now is 02:19 AM. |