Discussion Locked

DISCONNECTING REMOTE TELNET USER

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

i have a sun machine connected to aq w2k network. though not part of tghe domain. users telnet into this machine.
how can i disconnect a user who is working in a telnet session. and how can i log in with administarator password from telnet.

5 replies

by cpfeiffe

Killing the user session on the Unix server is as simple as killing the PPID. If you list all logged in uses with `who -T` you will see the process ID you need to kill (column 8). Then just do a 'kill -9 process_ID'. If you want to automate this to kill all telnetted users you can use a short script -
for PID in `ps -ef|grep "in.telnetd"|awk '{print $2}'
do
kill -9 $PID
done
All users that telnet into the box will have an in.telnetd process.

If you want to login as admin via telnet to w2k I'm not sure - but for Solaris edit /etc/default/login and comment out the line that reads CONSOLE=/dev/console. If this line is present it means root can only log in at the console; otherwise root can login from anywhere.

I hope this helps. Good luck.

by cavedweller

You are much safer logging in as yourself, then using "su" to gain admin priviledges. If you want to "log in as root" use "su - root". This way only users with valid accounts who also know the root password can become root. You can also associateroot sessions with specific users. Once a few users know the root password the account becomes anonymous and you don't know who did what. Also, by allowing direct root login you open up remote hacking to a one password attack where the su method requires two. By allowing only a few bad passwords before disconnecting you can significantly reduce your exposure to password breaking attacks.

This discussion is closed to new replies.