View previous topic :: View next topic |
Author |
Message |
VinzC Watchman


Joined: 17 Apr 2004 Posts: 5098 Location: Dark side of the mood
|
Posted: Wed Sep 06, 2006 11:20 am Post subject: Is there an admin command for closing a user's session? |
|
|
... other than kill <user logon process>?
Thanks. _________________ Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739! |
|
Back to top |
|
 |
GordSki Guru


Joined: 18 Oct 2004 Posts: 329
|
Posted: Wed Sep 06, 2006 3:10 pm Post subject: |
|
|
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 |
|
 |
VinzC Watchman


Joined: 17 Apr 2004 Posts: 5098 Location: Dark side of the mood
|
Posted: Wed Sep 06, 2006 5:06 pm Post subject: |
|
|
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 |
|
 |
beatryder Veteran


Joined: 08 Apr 2005 Posts: 1138
|
Posted: Wed Sep 06, 2006 9:38 pm Post subject: |
|
|
pkill -u <user id> _________________ Dont make it idiot proof, make it work.
Neucode.org
<suppressed key> |
|
Back to top |
|
 |
GordSki Guru


Joined: 18 Oct 2004 Posts: 329
|
Posted: Thu Sep 07, 2006 9:15 am Post subject: |
|
|
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 |
|
 |
dleverton Guru

Joined: 28 Aug 2006 Posts: 517
|
Posted: Thu Sep 07, 2006 9:17 am Post subject: |
|
|
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 |
|
 |
VinzC Watchman


Joined: 17 Apr 2004 Posts: 5098 Location: Dark side of the mood
|
Posted: Thu Sep 07, 2006 5:29 pm Post subject: |
|
|
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 |
|
 |
|