First: Create two ordinary users User1 and User2
[Root@lyt ~]# Useradd user1
[Root@lyt ~]# passwd user1 #创建密码
[Root@lyt ~]# useradd User2
[Root@lyt ~]# passwd user2 #创建密码
1, prohibit individual user login. For example, disable User1 user login.
[Root@lyt ~]# passwd-l user1 #使用-l Directive locks user1 so that it cannot log on, but can switch from the root account to the User1 user
[Root@lyt ~]# passwd-s user1 #-s indicates the status of the user User1 view
[Root@lyt ~]# passwd-u user1 #-u can release the locked user password
2: The user login in the modified/etc/passwd file
[Root@lyt ~]# vim/etc/passwd
[Root@lyt ~]# Su–user1 #登录到user1
3: Create/etc/nologin file, except root can log in, other users can not log in
(in Tty1-7, ordinary users can log in, but use other terminal normal users cannot)
Two: Limit root user Login modification/etc/securetty
1. If you want the root user to be unable to log in from Tty2, you can remove the Tty2 from the/etc/securetty:
2. If you want to allow a normal user Telnet login:
[Root@lyt ~]# Mkdir/mnt/cdrom
[Root@lyt ~]# mount/dev/cdrom/mnt/cdrom/
[Root@lyt ~]# cd/mnt/cdrom/server/
[Root@lyt server]# rpm-ivh telnet-server-0.17-39.el5.i386.rpm #安装telnet-server
[Root@lyt server]# Vim/etc/xinetd.d/telnet