Operating System - HP-UX
1819904 Members
2472 Online
109607 Solutions
New Discussion юеВ

Re: KIll user session in unix

 
sprakash1980
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
vishnu.khandare
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!!!!
Dennis Handly
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:
Ismail Azad
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".....
rariasn
Honored Contributor

Re: KIll user session in unix

Hi:

# who -T

# ps -fu username

rgs,