Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
remotely logout a physical console
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
stillman
Apprentice
Apprentice


Joined: 07 Dec 2002
Posts: 223
Location: Vienna, Austria

PostPosted: Mon Jan 09, 2006 9:46 pm    Post subject: remotely logout a physical console Reply with quote

one of my colleagues has accidentally forgotten to logout as root of our server at our telco(no monitor or keyboard attached at last). as nobody will go there soon, i was looking for a way to log out the user remotely. any tips?

Code:

# who
root     tty1         Jan  6 18:55
user    pts/0        Jan  9 20:00 (83.264.17.236)
Back to top
View user's profile Send private message
adsmith
Veteran
Veteran


Joined: 26 Sep 2004
Posts: 1386
Location: NC, USA

PostPosted: Mon Jan 09, 2006 10:03 pm    Post subject: Reply with quote

'ps faux' to find the login (bash) process number.
'kill -9 that_number' will end that process, thus logging him out.
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Tue Jan 10, 2006 1:03 pm    Post subject: Reply with quote

"kill -9" is a bit drastic. Use SIGHUP, SIGQUIT or SIGTERM before SIGKILL, to allow cleanup (SIGKILL can't be caught; if a process survives a SIGKILL then it's blocked on a kernel call). See signal(7).
_________________
No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS?
Back to top
View user's profile Send private message
adsmith
Veteran
Veteran


Joined: 26 Sep 2004
Posts: 1386
Location: NC, USA

PostPosted: Tue Jan 10, 2006 1:11 pm    Post subject: Reply with quote

yeah, sorry. just use "kill process_number".

I get in the habit of using kill -9 on a particular machine when a gazillion dead KDED processes are clinging desperately to my memory..
Back to top
View user's profile Send private message
stillman
Apprentice
Apprentice


Joined: 07 Dec 2002
Posts: 223
Location: Vienna, Austria

PostPosted: Tue Jan 10, 2006 2:07 pm    Post subject: Reply with quote

thanks!! :-)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum