Hi everybody,
First, Is the command who show all the users connected to my system? Is it equivalent to the commands last |grep still.
Second, How I can log-off a specific user?
Note: My system is AIX 4.3
Hi,
yes with who you see who is looged in to your system ... the same is for finger if installed ...
To 'logout' a user, simply kill the shell of them ...
/malcom
Thank you malcom for your response. Sorry, I didn't have much experince in UNIX. What do you mean by 'killing the shell'?, and how I can kill the shell?
You want to logoff the user 'john'.
# w
11:57AM up 46 days, 18:02, 2 users, load average: 1.01, 1.06, 1.06
User tty login@ idle JCPU PCPU what
john pts/0 12:40PM 4:38 0 0 rlogin
bob pts/1 11:57AM 0 0 0 /usr/bin/w64
You must kill the process of his shell. Every user logs into some kind of shell. In the below example john's shell is seen as '-ksh'. That is the process you need to kill.
# ps -ef|grep john
john 290912 385216 0 12:40:44 pts/0 0:00 rlogin somenode
john 323806 569424 0 12:40:35 pts/0 0:00 -ksh
We see the process id, or PID, is 323806. We pass that number to the 'kill' command with a signal of '-9' or TERMINATE.
# kill -9 323806
And he should be gone. Also consider the fact that whatever they are working on when you do this is lost if they have not saved their work.
I recommend you get your system admin to do this.