LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-01-2008, 12:26 AM   #1
prasunhowlader
LQ Newbie
 
Registered: Apr 2008
Posts: 12

Rep: Reputation: 0
telnet login using root password


I am using redhat linux 9. When i connect this using telnet i must using user password. How can i connect telnet using root password?
 
Old 09-01-2008, 01:06 AM   #2
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Rep: Reputation: 51
I assumes that you have the telnet-server package properly installed and listening on port 23.

By default, for security purposes, the root user can not telnet to a Red Hat system. One way to change this it to modify your /etc/pam.d/login and /etc/pam.d/remote files. A default file looks similar to this:
Code:
#%PAM-1.0
auth       required     pam_securetty.so
auth       required     pam_stack.so service=system-auth
auth       required     pam_nologin.so
account    required     pam_stack.so service=system-auth
password   required     pam_stack.so service=system-auth
session    required     pam_stack.so service=system-auth
session    optional     pam_console.so
In this file, the first line:
Code:
auth       required     pam_securetty.so
is what controls the root login for telnet, as well as other services. Understand what you are doing before making this change. If you do not understand what this will do to your system, then do not proceed.

In order to allow root login with telnet, comment out the first auth line so that your /etc/pam.d/login looks like this:
Code:
#%PAM-1.0
#Commented out below line in order to allow root access for telnet
#auth       required     pam_securetty.so
auth       required     pam_stack.so service=system-auth
auth       required     pam_nologin.so
account    required     pam_stack.so service=system-auth
password   required     pam_stack.so service=system-auth
session    required     pam_stack.so service=system-auth
session    optional     pam_console.so
Once you save these changes, you should be able to telnet to your system as the root user:
Code:
[root@jaws root]# telnet 10.0.0.15
Trying 10.0.0.15...
Connected to 10.0.0.15.
Escape character is '^]'.
Red Hat Enterprise Linux AS release 3 (Taroon Update 5)
Kernel 2.4.21-32.0.1.ELsmp on an i686
login: root
Password:
Last login: Sat Oct 22 11:58:56 from 10.0.0.25
Note: Make sure that the telnet service is enabled. To enable telnet:
Code:
chkconfig --level 345 telnet on

Last edited by your_shadow03; 09-01-2008 at 01:09 AM.
 
Old 09-01-2008, 04:32 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
If that's the orig RH9, not RH Fedora 9, it was discontinued yrs ago, so don't use it as it's wide open to exploits. Speaking of which, don't use telnet, use ssh, and login via non-root user, then su or sudo up to root as reqd.
 
Old 09-01-2008, 04:50 AM   #4
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,078

Rep: Reputation: 195Reputation: 195
Everything chrism01 one said because seriously, typing your root password over a telnet link, be it logging in as root or as another user and the using su is very unwise. In case you were not aware telnet is an insecure protocol that sends everything you do, including username and password, in clear text meaning if someone intercepts your traffic they know everything you typed. ssh encrypts everything including the username and password.
As for enabling remote login by root, well magine you want to try and brute force your way in to a system remotely. To do this you need to hit both a valid username and password. The usernames on the system could be anything, but there is guaranteed to be a user called root so that's what people attack. If you have a machine attached to the Internet with ssh enabled and look at the logs then chances are you'll see failed attempts to log in as root. If you must enable remote root login only do so for ssh key authenticated connections.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Password Recovery in Edubuntu 7.04 - In Terminal, Root Login : su , password : ????? farhannaeem13 Linux - Security 3 11-30-2007 10:59 AM
How to set login and password and root password in suse 10.2 sirius57 SUSE / openSUSE 8 07-24-2007 10:51 AM
Can't login with TELNET for ROOT sjcollier Linux - Newbie 5 08-17-2003 04:07 PM
telnet via xinetd refuse root password adme Linux - Networking 2 02-05-2003 03:04 PM
Login thru telnet as root uprichard Linux - Security 11 05-09-2002 01:12 PM


All times are GMT -5. The time now is 04:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration