1830856 Members
3291 Online
110017 Solutions
New Discussion

6 root logins

 
SOLVED
Go to solution
A Pandey
Frequent Advisor

6 root logins

i see that there are six root logins when i do finger command while i am logged in as root.

some are idle for 75 days!!!

no one is logged in that long ...

how do i remove these root logins?
6 REPLIES 6
TwoProc
Honored Contributor
Solution

Re: 6 root logins

do a grep for these processes by the tty they are on...
ps -ef | grep pty/a etc..
then kill the process that is associated with it.

By making sure you're going for root processes that have a tty assigned - you're going to get logins, and not necessary backgroup processes.

We are the people our parents warned us about --Jimmy Buffett
bhavin asokan
Honored Contributor

Re: 6 root logins

hi,

i don,t have idea about this option in linux.

try who -T

it will show the tty and ipaddress from where the login has done and the login date.

regds,


twang
Honored Contributor

Re: 6 root logins

to find out your own shell,
# w
and kill the shell processes of other root logins,
# ps -ef |grep pts |grep bash
root 5366 2604 0 2004 pts/2 00:00:00 bash
root 5413 2604 0 2004 pts/3 00:00:00 bash
root 5452 2604 0 2004 pts/4 00:00:00 bash
root 3166 2604 0 2004 pts/5 00:00:00 bash
root 4734 2604 0 2004 pts/8 00:00:00 bash
root 21847 2604 0 2004 pts/9 00:00:00 bash
root 9651 2604 0 2004 pts/10 00:00:00 bash
root 26459 26457 0 Jan14 pts/6 00:00:00 bash
root 29381 26457 0 Jan14 pts/7 00:00:00 bash
root 29622 26457 0 Jan14 pts/11 00:00:00 bash
mic 31141 31139 0 Jan17 pts/16 00:00:00 -bash
root 15345 15341 0 Jan18 pts/12 00:00:00 -bash
root 15441 15341 0 Jan18 pts/1 00:00:00 -bash
root 22373 15345 0 16:07 pts/12 00:00:00 grep bash
Nguyen Anh Tien
Honored Contributor

Re: 6 root logins

use who -T
[root@fileserver root]# who -Tu
root + tty1 Jan 19 13:20 03:33 2168
root + pts/0 Jan 19 16:59 . 10337 (tienna)
to determine how many user connect to
use tty to determine which terminal you are in.
[root@fileserver root]#tty
/dev/pts/0
then kill -9 PID

[root@fileserver root]#kill -9 2168
Regard
tienna
HP is simple
A Pandey
Frequent Advisor

Re: 6 root logins

thank you everyone!
rmueller58
Valued Contributor

Re: 6 root logins

What would preclude you from rebooting?

We have a cronjob that reboots our DNS boxes and one of our HP/UX application boxes each night.. It cleans up dead processes and insures I can get the files that maybe open closed prior to running fbackup or dump.

Just a thought.