removing user from console

If none of the more specific forums is the right place to ask

removing user from console

Postby nieca » 2006-07-16 09:23

hi there from Poland!

Code: Select all
$ who
krystian pts/0        Jul 16 11:07 (ffp58.internetdsl.tpnet.pl)
krystian pts/0        Jul 13 15:32


now to remove this inactive 2-nd user "krystian" ?

I have tried many ways with skill, slay but without effect?

only to restart my server will help?

cheers!

GN
nieca
 
Posts: 2
Joined: 2006-07-16 09:18

Postby Grifter » 2006-07-16 10:40

one way is to type who (or just w) and look at what pts or pty he's connecting from, and kill the first (parent) process with that pts/pty, slay is easier, it should work beautifully, see if there are some options to slay equalling kill -9, i think there should be
Eagles may soar, but weasels don't get sucked into jet engines...
Grifter
 
Posts: 1572
Joined: 2006-05-04 07:53
Location: Svea Rike

Postby nieca » 2006-07-16 10:50

as You can see there is no connecting place...

in a matter of fact there is the same user (in fact me - owner of the server)
killing pts0 gives nothing, killing user (skill -KILL -9 -u krystian without effect)

I don't wanna restart my server to correct this problem...
nieca
 
Posts: 2
Joined: 2006-07-16 09:18

Postby Red » 2006-07-19 15:57

Hi,
try with ps aux | grep krystian and kill his PID
User avatar
Red
 
Posts: 69
Joined: 2006-04-20 12:36

Postby Grifter » 2006-07-19 16:02

you don't kill pts/0 you kill the first process (ie bash or sshd or something) that's listed as being connected to pts/0, or whichever pts or pty the user is using
Eagles may soar, but weasels don't get sucked into jet engines...
Grifter
 
Posts: 1572
Joined: 2006-05-04 07:53
Location: Svea Rike

Postby Red » 2006-07-20 14:00

i want to remove user spasen

[root@aku spasen]# ps aux | grep sshd
root 3580 0.0 0.3 5568 1692 ? Ss 15:29 0:00 /usr/sbin/sshd
root 4857 0.0 0.5 7512 2632 ? Ss 16:50 0:00 sshd: spasen [priv]
spasen 4893 0.1 0.5 7512 2712 ? S 16:51 0:00 sshd: spasen@pts/2
root 4996 0.0 0.1 3668 664 pts/2 S+ 16:53 0:00 grep sshd
[root@aku spasen]#kill 4893
User avatar
Red
 
Posts: 69
Joined: 2006-04-20 12:36

Postby Red » 2006-07-25 23:20

Code: Select all
debian:~# who
red      :0           2006-07-26 01:07
red      pts/0        2006-07-26 02:08 (:0.0)
red      pts/1        2006-07-26 02:10 (:0.0)
red      pts/3        2006-07-26 02:20 (:0.0)
ninja    pts/4        2006-07-26 02:23 (pppoe-92.techno-link.com)
debian:~# ps aux | grep sshd
root      4842  0.0  0.2   4932  1072 ?        Ss   02:23   0:00 /usr/sbin/sshd
root      4844  0.0  0.4   7704  2316 ?        Ss   02:23   0:00 sshd: ninja [priv]
ninja     4846  0.0  0.3   7704  1568 ?        S    02:23   0:00 sshd: ninja@pts/4
root      4879  0.0  0.1   2148   620 pts/0    S+   02:25   0:00 grep sshd
debian:~# kill 4846
debian:~# who
red      :0           2006-07-26 01:07
red      pts/0        2006-07-26 02:08 (:0.0)
red      pts/1        2006-07-26 02:10 (:0.0)
red      pts/3        2006-07-26 02:20 (:0.0)
debian:~#
:twisted:
User avatar
Red
 
Posts: 69
Joined: 2006-04-20 12:36


Return to General Questions

Who is online

Users browsing this forum: No registered users and 18 guests

fashionable