cancel
Showing results for 
Search instead for 
Did you mean: 

KIll user session in unix

 
Highlighted
Occasional Advisor

KIll user session in unix

Hi There,

I need help on the command how to check which user is login to the system and kill the user session in unix level.This is because my company is using unix to intergrate with ERP system USers normally do not log out of the system properly and the session is still active.Now i want to know who is active loging to the system and kill the session.Please help
4 REPLIES 4
Highlighted
Respected Contributor

Re: KIll user session in unix

Hi Prakash,

Check by w command how many users are logged in, then get the pid of that perticular session by following command,
#ps -ef |grep -i pts/XX
XX will be digit no.
then from that output, u will get and PID which is logged in by ssh or telnet at that perticulat pts/XX session.

By killing that pid, session will be end.
Hope this solves ur query.
Dont forget to assign points.


Regards
Vishnu Khandare
You should deserve before U desire!!!!
Highlighted
Acclaimed Contributor

Re: KIll user session in unix

Users normally do not log out of the system properly and the session is still active.

What HP-UX version are you using?
You may have bogus entries in utmp(4) and those may not be removed without rebooting:
Highlighted
Esteemed Contributor

Re: KIll user session in unix

Hi,

Adding to what vishnu said, since subject says "kill user session in unix", after finding active users and process IDs use the command
kill -9 pid. A similar problem arises when you do a usermod and there is an active session open. You use a similar procedure. Hope it helps a bit.

Regards
Read, read and read... Then read again until you read "between the lines".....
Highlighted
Honored Contributor

Re: KIll user session in unix

Hi:

# who -T

# ps -fu username

rgs,