centos add users and give root administrator privileges
When using centos, root users are generally super administrators, generally do not easily to others, but sometimes the root account when colleagues need to install the software, they have to give, only to re-build a user, and give administrator privileges. The following describes how to create and give the user administrator privileges method steps:
1, the new user, where a new user temp_test
adduser temp_test
2, set a new user password
passwd temp_test
3, modify the permissions sudoers file into editable
chmod -v u+w /etc/sudoers
4, using the vim editor sudoers file
vim /etc/sudoers
5, add the following content sudoes file
Find the root ALL = (ALL) ALL
Then add temp_user ALL = (ALL) ALL
To not lose a password when a new user using sudo, the last read ALL NOPASSWD: ALL can be.
6, the permission to modify sudoers file is not editable
chmod -v u-w /etc/sudoers
When using centos, root users are generally super administrators, generally do not easily to others, but sometimes the root account when colleagues need to install the software, they have to give, only to re-build a user, and give administrator privileges. The following describes how to create and give the user administrator privileges method steps:
1, the new user, where a new user temp_test
adduser temp_test
2, set a new user password
passwd temp_test
3, modify the permissions sudoers file into editable
chmod -v u+w /etc/sudoers
4, using the vim editor sudoers file
vim /etc/sudoers
5, add the following content sudoes file
Find the root ALL = (ALL) ALL
Then add temp_user ALL = (ALL) ALL
To not lose a password when a new user using sudo, the last read ALL NOPASSWD: ALL can be.
6, the permission to modify sudoers file is not editable
chmod -v u-w /etc/sudoers