visudo 编辑 sudoers 文件
Syntax format: visudo "option" su [option]
Attention:
- Visudo command and subsequent options and user names, there must be at least one space between each element
- The Visudo command is specifically used to edit the/etc/sudoers file, and provides the functionality for grammar checking.
Parameter options:-C, manual syntax checking
Case one:
Use parameter-c to check syntax
Case TWO:
Use the Visudo command to authorize regular user Tom
Added a normal user Tom line in the 92 line position
To use Tom again to create a user, you need to use the sudo command
Case THREE:
sudo power configuration Instructions
% User Group machine = (permission to use which role is authorized)/usr/sbin/useradd
| user or Group on behalf of authorized users |
machine = (authorization role) |
commands that can be executed |
| User |
Machine= |
COMMANDS |
| Tom |
All= (All) |
/usr/sbin/useradd |
Linux Common Commands--visudo