In production, sometimes due to security reasons, usually non-Linux administrators are only ordinary users of the account, but sometimes some operations require root permissions, this can be done by sudo, the steps are as follows:
A. For example, our average user account name is XUSJ. To edit the configuration file for sudo:
Input: Visudo
Find root all= (all) all this line
Add XUSJ This user below, give him root permission, add a new line:
XUSJ all= (All) all
B. At this time in XUSJ this user, input sudo bash, will be prompted to enter XUSJ This user's password, input can enter the root operation mode.
[[email protected] ~]$ sudo bash
[sudo] password for XUSJ: XUSJ
[email protected] xusj]#
This article is from the "less stubborn" blog, please be sure to keep this source http://xushaojie.blog.51cto.com/6205370/1680421
Linux Normal user with root privileges