This article is a mirror article of machine translation, please click here to jump to the original article.

View: 10901|Reply: 0

[linux] linuxroot login: A method to restrict the login of the root user under the Linux operating system

[Copy link]
Posted on 12/22/2014 10:53:55 PM | | |
/etc/securetty这个文件中保存了root用户可以登录终端名称或telnet登录

    1. If you want the root user to only log in from tty1 and tty2, modify the /etc/securetty file and keep only the following two lines

    [root@localhost ~]# cat /etc/securetty

    tty1

    tty2

    2. If you want to allow users to log in to telnet, add pts/1, pts/2, etc., and the modified file content is as follows

    [root@localhost ~]# cat /etc/securetty

    tty1

    tty2

    pts/1

    pts/2

    3. If you don't restrict the root user from logging in from any location, you can delete this file or change the name

    [root@localhost ~]# mv /etc/securetty /etc/securetty.bak




Previous:Installing Linux on a mobile hard drive: How to install Linux on a mobile drive
Next:Easy language 5000 source code routines and 1000 modules
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com