sudoers配置
来源:互联网 发布:linux exit code 127 编辑:程序博客网 时间:2024/06/05 05:54
sudoers的缺省配置:
#############################################################
## Next comes the main part: which users can run what software on
## which machines (the sudoers file can be shared between multiple
## systems).
## Syntax:
##
## user MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
## Allows members of the 'sys' group to run networking, software,
## service management apps and more.
# %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS
## Allows people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
## Allows members of the users group to mount and unmount the
## cdrom as root
# %users ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom
## Allows members of the users group to shutdown this system
# %users localhost=/sbin/shutdown -h now
##########################################################
1. 让普通用户admin具有root的所有权限
执行visudo之后,可以看见缺省只有一条配置:
root ALL=(ALL) ALL
那么你就在下边再加一条配置:
admin ALL=(ALL) ALL
这样,普通用户admin就能够执行root权限的所有命令
以admin用户登录之后,执行:
sudo su -
然后输入admin用户自己的密码,就可以切换成root用户了
2. 让用户admin和apache拥有部分命令的root权限,并且不需要输入密码
admin ALL= NOPASSWD: /usr/local/www/scripts/
apache ALL= NOPASSWD: /usr/local/www/scripts/,/usr/local/bin/
- sudoers配置
- sudoers配置
- sudoers配置
- sudoers文件配置(转)
- sudoers文件配置(转)
- sudoers file 配置
- sudoers文件配置
- sudoers文件配置
- /etc/sudoers的配置
- sudoers配置详解
- Sudoers配置学习
- sudoers
- linux安全配置/etc/sudoers&wheel组
- linux sudo使用和sudoers配置详解
- linux sudo使用和sudoers配置详解
- linu下/etc/sudoers文件配置
- sudo(ers)指南, sudoers配置详解
- linux sudo使用和sudoers配置详解
- poj 1142 Smith Numbers
- MySQL-python-1.2.3.win32-py2.7.exe文件
- Request 获取路径
- Study JQuery《1、基础》
- jQuery 语法
- sudoers配置
- 一个实用的公式计算器 --记录下路径
- 一步一步使用Ext JS MVC与Asp.Net MVC 3开发简单的CMS后台管理系统之用户管理(2)
- C++ 虚函数解析
- 23种设计模式(5):原型模式 .
- PLSQL Developer 的自动登录
- fluent+mongodb搭建日志系统中的几个问题
- Study JQuery《2、选择器》
- Asp.Net对文件和文件夹的操作大全