普通用户,执行不了管理员的权限。
将普通用户加入到sudoer,即可使用sudo 命令,需要以root 进行以下配置:
vi /etc/sudoers
1. 添加用户
## Allow root to run any commands anywhere
root ALL=(ALL)ALL
添加一行
cao ALL=(ALL) ALL
2.添加群组
## Allows people in group wheel to run all commands
# %wheel ALL=(ALL)ALL
%developer ALL=(ALL)ALL
本文介绍如何通过编辑/etc/sudoers文件来为普通用户或用户组添加sudo权限,使得这些用户能够执行需要管理员权限的操作。
4476

被折叠的 条评论
为什么被折叠?



