4
sudoers: 允许用户免密用root权限执行某些命令
source link: https://www.felix021.com/blog/read.php?2233=
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
sudoers: 允许用户免密用root权限执行某些命令
sudoers: 允许用户免密用root权限执行某些命令
备查。
RSS订阅地址: https://www.felix021.com/blog/feed.php 。
#允许 felix021 用户免密 sudo 为所欲为
felix021 ALL=(ALL:ALL) NOPASSWD: ALL
#允许 adm 这个 group 免密 sudo 为所欲为
%adm ALL=(ALL:ALL) NOPASSWD: ALL
# Cmnd alias specification
Cmnd_Alias APT_CMD=/usr/bin/apt-get install *, /usr/bin/apt install *
# 允许所有用户用 root 权限执行 APT_CMD 下的所有命令
ALL ALL=(root) NOPASSWD: APT_CMD
felix021 ALL=(ALL:ALL) NOPASSWD: ALL
#允许 adm 这个 group 免密 sudo 为所欲为
%adm ALL=(ALL:ALL) NOPASSWD: ALL
# Cmnd alias specification
Cmnd_Alias APT_CMD=/usr/bin/apt-get install *, /usr/bin/apt install *
# 允许所有用户用 root 权限执行 APT_CMD 下的所有命令
ALL ALL=(root) NOPASSWD: APT_CMD
欢迎扫码关注:
转载请注明出自 https://www.felix021.com/blog/read.php?2233 ,如是转载文则注明原出处,谢谢:)RSS订阅地址: https://www.felix021.com/blog/feed.php 。
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK