pipporosso
asked on
Dead/orphan users
Is there an easy method to clean up dead or orphan users. I have some users log on to a linux server, but don't exit cleanly. I'm not an expert on linux, but the box is being used as a proxy, but there are users who log on to configure or restart certain services and don't exit cleanly. I would like to know if there is some method available to clean up orphan user sessions.
pipporosso
pipporosso
See if you have the program pkill on your system. On my SuSE system it was installed with the ps package. pkill can be used to kill all processes that are owned by a specified user. This example kills all processes owned by the user "test"
pkill -9 -U test
You need to be root in order to kill processes owned by other users.
pkill -9 -U test
You need to be root in order to kill processes owned by other users.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
# ps -ef | grep jtest | grep -v grep
jtest 4100 4098 0 12:06 ? 00:00:00 /usr/sbin/sshd
jtest 4102 4100 0 12:06 pts/1 00:00:00 -bash
# kill -9 4102