Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Is there an admin command for closing a user's session?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Wed Sep 06, 2006 11:20 am    Post subject: Is there an admin command for closing a user's session? Reply with quote

... other than kill <user logon process>?

Thanks.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
GordSki
Guru
Guru


Joined: 18 Oct 2004
Posts: 329

PostPosted: Wed Sep 06, 2006 3:10 pm    Post subject: Reply with quote

Is there a particular reason why you don't want to use kill? As far as I can tell there doesn't seem to be much of an alternative.....

G.
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Wed Sep 06, 2006 5:06 pm    Post subject: Reply with quote

GordSki wrote:
Is there a particular reason why you don't want to use kill? As far as I can tell there doesn't seem to be much of an alternative.....

G.

For the same reasons when I want someone to leave I tell him first. I only use weapons when he refuses to leave, sticks to my door and starts to insult me and my family ;-) .

EDIT: More seriously, I wasn't sure what to kill either... I think now I know.

EDIT: There is another reason, which I've just discovered. Killing the logon process prevents the logout shell script from running, eventually disclosing private information.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
beatryder
Veteran
Veteran


Joined: 08 Apr 2005
Posts: 1138

PostPosted: Wed Sep 06, 2006 9:38 pm    Post subject: Reply with quote

pkill -u <user id>
_________________
Dont make it idiot proof, make it work.
Neucode.org
<suppressed key>
Back to top
View user's profile Send private message
GordSki
Guru
Guru


Joined: 18 Oct 2004
Posts: 329

PostPosted: Thu Sep 07, 2006 9:15 am    Post subject: Reply with quote

You could use 'write' to send the user a message asking them to leave.

You could then give them a couple of minutes to finnish up then send them another message if they're still there giving them 10 seconds before you issue the kill.

Finally depending on how the logout script is used, you could manually clean up after the user has been punted.

A bit nicer than pulling the trigger straight away, but I think the kill is the only option if someone won't leave.

G.
Back to top
View user's profile Send private message
dleverton
Guru
Guru


Joined: 28 Aug 2006
Posts: 517

PostPosted: Thu Sep 07, 2006 9:17 am    Post subject: Reply with quote

VinzC wrote:
EDIT: There is another reason, which I've just discovered. Killing the logon process prevents the logout shell script from running, eventually disclosing private information.

Have you tried killing the process with a SIGHUP? I can't test right now, but I think that would run the logout script.
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Thu Sep 07, 2006 5:29 pm    Post subject: Reply with quote

dleverton wrote:
Have you tried killing the process with a SIGHUP? I can't test right now, but I think that would run the logout script.

Yes, I did on both bash and the logon process. Doesn't work either.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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