Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

Is there an admin command for closing a user's session?

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
VinzC
Watchman
Watchman
User avatar
Posts: 5100
Joined: Sat Apr 17, 2004 1:51 pm
Location: Dark side of the mood

Is there an admin command for closing a user's session?

  • Quote

Post by VinzC » Wed Sep 06, 2006 11:20 am

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

Thanks.
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Top
GordSki
Guru
Guru
User avatar
Posts: 329
Joined: Mon Oct 18, 2004 7:48 pm
Contact:
Contact GordSki
Website

  • Quote

Post by GordSki » Wed Sep 06, 2006 3:10 pm

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.
Top
VinzC
Watchman
Watchman
User avatar
Posts: 5100
Joined: Sat Apr 17, 2004 1:51 pm
Location: Dark side of the mood

  • Quote

Post by VinzC » Wed Sep 06, 2006 5:06 pm

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!
Top
beatryder
Veteran
Veteran
User avatar
Posts: 1138
Joined: Fri Apr 08, 2005 12:27 am
Contact:
Contact beatryder
Website

  • Quote

Post by beatryder » Wed Sep 06, 2006 9:38 pm

pkill -u <user id>
Dont make it idiot proof, make it work.
Neucode.org
<suppressed key>
Top
GordSki
Guru
Guru
User avatar
Posts: 329
Joined: Mon Oct 18, 2004 7:48 pm
Contact:
Contact GordSki
Website

  • Quote

Post by GordSki » Thu Sep 07, 2006 9:15 am

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.
Top
dleverton
Guru
Guru
Posts: 517
Joined: Mon Aug 28, 2006 3:09 pm

  • Quote

Post by dleverton » Thu Sep 07, 2006 9:17 am

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.
Top
VinzC
Watchman
Watchman
User avatar
Posts: 5100
Joined: Sat Apr 17, 2004 1:51 pm
Location: Dark side of the mood

  • Quote

Post by VinzC » Thu Sep 07, 2006 5:29 pm

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!
Top
Post Reply

7 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic