Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logging off users

Status
Not open for further replies.

coppies5

Technical User
Nov 22, 2002
6
US
I need a way to logoff all users.
 
A few questions first

What UNIX, Application

Are you willing just to drop them or would you like a clean method. --
| Mike Nixon
| Unix Admin
| ----------------------------
 
I'm runn AIX 4.3.3 and would perfer a clean method to logoff the users, but would consider to just drop them if I have to.
 
Hi,

kill -15 process_id for clean. kill -9 process_id for severe one.

You can get process_id from who command. refer to who man page for option. On my system I use "who -u". To kill all users just do :

for userprocess in `who -u | awk '{print $7}'
do
kill -15 $userprocess
done

regards,
feroz
 
Worked like a champ, it's exactly what I needed to do.

Thanks for the help feroz...
 
Hi,

Make sure you dont kill your own user_id unless you want to run it from script. And you dont want anybody to logon duirng system backup or something.

regards,
feroz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top