Hello World!
Toggle navigation
Home
开发
运维部署
旧博客搬家
About Me
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Archives
Tags
sudo修改
2021-07-12 06:23:42
53
0
0
lion
# /etc/sudoers 文件内容示例 # # This file MUST be edited with the 'visudo' command as root. # # Please consider adding local content in /etc/sudoers.d/ instead of # directly modifying this file. # # See the man page for details on how to write a sudoers file. # Defaults env_reset Defaults mail_badpass Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" # Host alias specification # User alias specification # Cmnd alias specification #网络操作相关命令别名 Cmnd_Alias NETWORKING = /sbin/route, /sbin/ifconfig, /bin/ping, /sbin/dhclient,/usr/bin/net,/sbin/iptables,/usr/bin/rfcomm,/usr/bin/wvdial,/sbin/iwconfig,/sbin/mii-tool,/bin/netstat ## Installation and management of software #软件安装管理相关命令别名 Cmnd_Alias SOFTWARE = /usr/bin/apt-get,/usr/bin/snap ## Services #服务相关命令别名 Cmnd_Alias SERVICES = /sbin/systemctl,/usr/bin/docker,/usr/snap/docker ## Storage #磁盘操作相关命令别名 Cmnd_Alias STORAGE = /sbin/fdisk,/sbin/sfdisk,/sbin/parted,/sbin/partprobe,/bin/mount,/bin/umount,/bin/du,/bin/df,/bin/cat,/bin/ls ## Delegating permissions #代理权限相关命令别名 Cmnd_Alias DELEGATING = /usr/sbin/visudo, /bin/chown, /bin/chmod, /bin/chgrp ## Processes #进程相关命令别名 Cmnd_Alias PROCESSES = /bin/nice, /bin/kill, /usr/bin/kill, /bin/ps # User privilege specification root ALL=(ALL:ALL) ALL # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL # Allow members of group sudo to execute any command # sudo组的用户可以免密码以root权限执行以下命令 %sudo ALL=(ALL:ALL) NOPASSWD:NETWORKING,SOFTWARE,SERVICES,STORAGE,PROCESSES # See sudoers(5) for more information on "#include" directives: #includedir /etc/sudoers.d
Pre: No Post
Next:
JumpServer部署
0
likes
53
Weibo
Wechat
Tencent Weibo
QQ Zone
RenRen
目录