logging out a ssh-user

2003-07-26 Thread Dennis Stampfer
Hi!

I have to log out a user who is logged in via ssh.  The information that
he is not allowed to login comes from the utmp-file like the pid to  
kill.  
If he's logged in via telnet, I can do the job by killing that pid.  That
does not work with ssh: For some reason, all what I get out of utmp is 
the pid of the listening sshd which I can't kill if I don't want to 
disable ssh-logins.

I solved it by adding 2 to that pid to reach the child-ssh,
checking if it is "sshd" and owned by the user who is to be logged
out.  If that all is ok, I kill that pid.

Well, it works, but is that reliable and secure?  Will this also work after
the maximum of PID is reached?

The package I am talking about is timeoutd.  (No bug for that)

Dennis




Re: logging out a ssh-user

2003-07-27 Thread Dennis Stampfer
On Sun, Jul 27, 2003 at 09:47:29AM +0200, Norbert Tretkowski wrote:
> * Dennis Stampfer <[EMAIL PROTECTED]> wrote:
> > I have to log out a user who is logged in via ssh.
> 
> ,
> | % apt-cache show slay

Sure, but I can't fix a bug by saying "use slay instead of this
package"... ;)

Dennis




Need help: Idle X-user?

2003-12-08 Thread Dennis Stampfer
Hi -devel,

the program timeoutd was originally written when using X was not a matter
of course:

timeoutd loggs user out when they reached timeout-restrictions like max.
login-time, max. idle-time, etc.

Some users asked for X-Support. Well, X works well with "No login
allowed at all" and "Login restricted to max. X minutes", but it does
not work with "Logout, when user U was idle Yminutes.
Support for X and "idle-logout" is not included within timeoutd. My
question is:

Is there any way to querry how long a X-user is idle? If not, do you
think it's okay to write something like "IDLE-Logout does not work
with X" into Readme.Debian and into the config-file(,manpage, ...)?

I found no way to check if a user is idle without using extra libraries,
and if I use extra libaries, new depencies are needed wich users don't
need if they have no X on their box. (these extra-depencies may depend
on X, so they need X, etc...)

thank you,
Dennis