Unix Technical Forum

ghost user

This is a discussion on ghost user within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> I was doing a test to check to see if the /etc/limits was working to limit logins, (which didn't ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-19-2008, 11:33 AM
alex
 
Posts: n/a
Default ghost user

I was doing a test to check to see if the /etc/limits was working to
limit logins, (which didn't work). I created a user named "test".
using putty from a windows box, i logged in three times (ulimit was 2)
via ssh2. I was disappointed to see that it let me, but then 'exit' 'ed
out of each session.. after which i saw it still showed the user in the
"who" output.. utmp (via last) says the user is out.. but i can't correct
this. First i tried to "/etc/rc.d/rc.sshd restart" didn't work.
then i tried "/etc/rc.d/rc.sshd stop", "/etc/rc.d/rc.sshd start". didn't
work.
then i tried "init 1", "init 3". I thought that was supposed to boot every
one off the system.. but no, it didn't work either.. Anyway i can get
rid of this ghost user, without rebooting the system?

( I have a reboot scheduled next week, and this doesn't seem to be
effecting the system at all, additional pts/ just goes around the one
taken...)

Thanks for your help,
alex

PS.. Sorry for the lenght, relevant command output below:

root@aeshells.com:~# who
alex pts/1 May 15 23:40 (athlon.aeshells.org)
test pts/2 May 15 20:17

root@aeshells.com:~# last -n 10
batboyz pts/2 c211-28-160-120. Sat May 15 23:55 - 23:59 (00:03)
alex pts/1 athlon.aeshells. Sat May 15 23:40 still logged in
bunjoy pts/0 210.23.214.189 Sat May 15 23:40 - 00:06 (00:25)
root tty1 Sat May 15 23:40 - 23:55 (00:15)
alex pts/0 athlon.aeshells. Sat May 15 23:38 - 23:39 (00:00)
alex pts/0 athlon.aeshells. Sat May 15 23:37 - 23:38 (00:00)
alex tty1 Sat May 15 23:37 - 23:39 (00:02)
test pts/2 athlon.aeshells. Sat May 15 23:36 - 23:36 (00:00)
test pts/1 athlon.aeshells. Sat May 15 23:35 - 23:36 (00:00)
test pts/0 athlon.aeshells. Sat May 15 23:35 - 23:36 (00:00)
root@aeshells.com:~# ps -ef | grep ssh
root 26308 1 0 May15 ? 00:00:00 /usr/sbin/sshd
root 26364 26308 0 May15 ? 00:00:00 sshd: alex [priv]
alex 26376 26364 0 May15 ? 00:00:00 sshd: alex@pts/1


--
-Jeromy


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-19-2008, 11:33 AM
Menno Duursma
 
Posts: n/a
Default Re: ghost user

On Sun, 16 May 2004 04:14:08 +0000, alex wrote:

> I was doing a test to check to see if the /etc/limits was working to
> limit logins, (which didn't work).


It only works for logins which have gone through /bin/login .

> I created a user named "test".


Way to go. (Just don't make the password "test" as well (or some such. :-)))

> using putty from a windows box, i logged in three times (ulimit was 2)
> via ssh2. I was disappointed to see that it let me,


Try editing /etc/passwd and put like so:
test:x:1010:100:ulimit=2:/home/test:/bin/bash

But if you don't want some user to login via SSH, better to set /bin/false
as the default shell for them (you may need to add that to /etc/shells too.)

To set limits on any resources, for some users, have a look at "lshell":
http://rm-f.net/lshell/

If you don't trust your shell users enough, to not mess about your boxen.
I would very much consider UML (User-mode Linux):
http://www.google.nl/groups?selm=pan...0deskt op.lan

And / or Linux-VServer:
http://www.linux-vserver.org/

> but then 'exit' 'ed out of each session.. after which i saw it still
> showed the user in the "who" output.. utmp (via last) says the user is
> out.. but i can't correct this.


Try removeing /var/run/wtmp or get an editor from "packetstorm" maybe ...

--
-Menno.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:36 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com