Test environment: CentOS 6.51, add users, first add a normal user with the AddUser command, the command is as follows: #adduser Tommy//Add a user named Tommy #passwd Tommy // Modify the password changing password for user Tommy. New UNIX Password: //Enter this password here Retype Unix password: //Enter new password again passwd:all authentication tokens updated Successfully. 2, give root permission method One: Modify the/etc/sudoers file, find the following line, the previous comment (#) removed # # allows people in group wheel to run all Commands%wheel
all= (All) Su- , you can get root permission to operate. Method Two: Modify the/etc/sudoers file, locate the following line, and add a line below root as follows: # allow ROOT to run any commands anywhereroot all= (All) Alltommy all= (All) Su- , you can get root permission to operate.
But it looks like the red and thicker Su-- I usually use sudo. I don't know if the author is a typo or something, because with Su, I need to know the root password, so sudo will be better.
Linux gives ordinary users root privileges