How to set up a linux system and other ordinary users to the root user under

1, modify / etc / sudoers, find the following line, add a normal user to root below, such as user abc (abc provided that the user already exists, and set your password):

Allow root to run any commands anywhere

ALL = root (ALL) ALL
abc ALL = (ALL) ALL
2, meaning that is given to allow the user abc as with root privileges, execute any command at any location.
3, edit ssh configuration file, locate the following line, the yes to no, prohibit root user login:
vi / etc / ssh / sshd_config
#PermitRootLogin yes
PermitRootLogin NO
4, after more than a simple configuration, can disable root login, use ordinary after the user abc to log on the machine, if you want to switch to root, and then use the su command to switch to root:
su root
and then follow the prompts to enter the appropriate password;
5, the proposed ban is in ssh root login well, to avoid being break; otherwise modify the default ssh port 22, or add ssh whitelist to do about the security server.

Guess you like

Origin blog.51cto.com/mengbo2006214/2440262