初学者! 朋友们帮我看看!
在没有建立用户的时候我用 root 用户 telnet 不上去! 网上查到需要修改
1、开启telnet! vi /etc/xinetd.d/telnet 打开文件后,将里面的disable=yes行前面加上#注释掉,保存退出,重新启动 xinetd服务 /etc/rc.d/init.d/xinetd restart
2、配置允许root用户登录
允许root用户登录是很不安全的,但是有时候为了测试的方便,也可以允许root用 户登录,但是这个方法最好不要对公网开放使用。
vi /etc/pam.d/login
将文件中的
auth required pam_securetty.so
加上“#”注释掉,就可以实现在登录的时候允许root用户了。
3. 网上看到说不能telnet! 有可能是因为开启了selinux ! 而我在安装的时候没有选择安装 selinux
[root@redhat /]# cat /etc/selinux/config
.........................................................................................................
# disabled - SELinux is fully disabled.
#SELINUX=enforcing
SELINUX=disabled
.........................................................................................................
修改完之后 保存 重启服务! 我再次 telnet 试试!!
#telnet 192.168.1.5
redhat (Linux release 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 EDT 2005) (6)
login: root
Password for root:
Login incorrect
结果还是不行! root 用户一样不能 telnet 上去!
于是我新建立了两个用户! 登陆上去,然后 su 到 root !
我新建立用户的步骤!
[root@redhat /]# groupadd -g 200 shenghuo
[root@redhat /]# useradd -u 200 -g shenghuo -d /home/linux -s /bin/bash linux
[root@redhat /]# passwd linux
Changing password for user linux.
New UNIX password:
BAD PASSWORD: it is too short
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@redhat /]# useradd -u 300 -g shenghuo -d /home/hhh -s /bin/bash hhh
[root@redhat /]# passwd hhh
Changing password for user hhh.
New UNIX password:
BAD PASSWORD: it's WAY too short
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@redhat /]# ls -l /home
总用量 28
drwx------ 4 504 root 4096 9月 27 16:58 hhh
drwx------ 4 linux shenghuo 4096 9月 28 11:18 linux
drwx------ 2 root root 16384 8月 23 22:58 lost+foun
然后用 新建立的用户 telnet ! 但是反映很慢! 估计要1 分钟才能等上! 而且刚建立的两个用户登陆信息都不一样!
1: #telnet 192.168.1.5
redhat (Linux release 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 EDT 2005) (4
login: linux
Password for linux:
login: Cannot contact any KDC for requested realm while getting initial credentials
Last login: Thu Sep 28 11:17:27 from 192.168.1.119
[linux@redhat ~]$
2:#telnet 192.168.1.5
redhat (Linux release 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 EDT 2005) (5
login: hhh
Password for hhh:
login: Cannot contact any KDC for requested realm while getting initial credentials
-bash: /home/hhh/.bash_profile: 权限不够
-bash-3.00$ pwd
/home/hhh
-bash-3.00$ ls
ls: .: 权限不够
-bash-3.00$
一:
问题1:用root用户不能 telnet... 我知道 telnet 不安全,但是有的时候因为实验的需要或者测试的需求! 需要用到 telnet 来登陆! 平时应用的时候 我们都用 SSH!
二:
问题2:我在建立用户的时候把 linux 和 hhh 用户都放在了 shenghuo 组下面!
可是为什么, hhh 跑到了 root 组! 那个 504 又是什么?
[root@redhat /]# ls -l /home
总用量 28
drwx------ 4 504 root 4096 9月 27 16:58 hhh
drwx------ 4 linux shenghuo 4096 9月 28 11:18 linux
drwx------ 2 root root 16384 8月 23 22:58 lost+foun
三:
问题3:看到红色不同的地方吗? 同样的方法建立的两个用户! 在同一个组下面! 为什么,登陆进去之后的界面不一样!?
1. telnet 192.168.1.5
redhat (Linux release 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 EDT 2005) (4)
login: linux
Password for linux:
login: Cannot contact any KDC for requested realm while getting initial credentials
Last login: Thu Sep 28 11:17:27 from 192.168.1.119
[linux@redhat ~]$
2.telnet 192.168.1.5
redhat (Linux release 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 EDT 2005) (5)
login:hhh
Password for hhh:
login: Cannot contact any KDC for requested realm while getting initial credentials
-bash: /home/hhh/.bash_profile: 权限不够
-bash-3.00$
四:
系统显示的信息!
问题四: 这条信息在哪里可以查到! 因为,我记得系统刚装的时候 telnet 不是显示这样的信息! 这条信息是不是显示系统什么地方有问题! 该上哪查? 如果确实是否有错!? 如果修改??
即:#telnet 192.168.1.5
redhat (Linux release 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 EDT 2005) (5)
高手们帮我看看啊! 在线等高手的答案啊!!
我都晕了! |