Operating System - Linux
1758027 Members
1974 Online
108866 Solutions
New Discussion юеВ

Re: RHEL4 - telnet as root denied

 
Thomas J. Harrold
Trusted Contributor

RHEL4 - telnet as root denied

When I run chkconfig --list, I see the xinetd service "krb5-telnet", not just "telnet".

I turn on krb5-telnet, and non-root users can then telnet and login successfully. Root, however cannot. I have already added entries into /etc/securetty to allow pts/0 --> pts/4 access. No luck.

This is only a one-time thing - I plan to disable telnet once we load some software that requires telnet access to install...

What am I missing?

-tjh
I learn something new everyday. (usually because I break something new everyday)
3 REPLIES 3
Sung Oh
Respected Contributor

Re: RHEL4 - telnet as root denied

Matthew J Warrick
Frequent Advisor

Re: RHEL4 - telnet as root denied

from RHN:

This article 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 file. A default file looks similar to this:

#%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:

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:

#%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:

[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
"Did you get that memo?"
Thomas J. Harrold
Trusted Contributor

Re: RHEL4 - telnet as root denied

Turns out that telnet-server package is no longer installed by default. I'll install, and this should solve my issue.

I'd be interested to know if the krb5-telnetd is able to allow root login at all.

Argh.

Thanks,

-tjh
I learn something new everyday. (usually because I break something new everyday)