红联Linux门户
Linux帮助

请教一个root用户不能telnet的问题

发布时间:2011-11-30 17:00:43来源:红联作者:724463309
大家好,本人初学Linux,安装好系统后,想配置telnet方便以后管理,可是在配置好后,使用root用户登陆时,输入完密码会提示Login incorrect,以下是一些配置信息:

[root@localhost /]# uname -a
Linux localhost.localdomain 2.6.18-128.el5 #1 SMP Wed Dec 17 11:42:39 EST 2008 i686 i686 i386 GNU/Linux
[root@localhost /]# cat /etc/xinetd.d/telnet
# default: on
# description: The telnet server serves telnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = no
}
[root@localhost /]# cat /etc/securetty
console
vc/1
vc/2
vc/3
vc/4
vc/5
vc/6
vc/7
vc/8
vc/9
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
pts/1
pts/2
pts/3
[root@localhost /]# chkconfig --list telnet
telnet on
[root@localhost /]# setenforce 0
setenforce: SELinux is disabled
[root@localhost /]# service iptables status
Firewall is stopped.
[root@localhost /]# telnet 127.0.0.1
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
Red Hat Enterprise Linux Server release 5.3 (Tikanga)
Kernel 2.6.18-128.el5 on an i686
login: root
Password:
Login incorrect

上网查了一下资料,发现有人说要把/etc/pam.d/login中的pam_securetty.so行释掉"#"
[root@localhost /]# cat /etc/pam.d/login
#%PAM-1.0
#auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
auth include system-auth
account required pam_nologin.so
account include system-auth
password include system-auth
# pam_selinux.so close should be the first session rule
session required pam_selinux.so close
session include system-auth
session required pam_loginuid.so
session optional pam_console.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session required pam_selinux.so open
session optional pam_keyinit.so force revoke

可我注释掉后仍然无法使用root用户登陆,请问有人遇到这样的问题吗?
文章评论

共有 0 条评论