减少root 的登入 : sudo
来源:互联网 发布:php函数引用外部变量 编辑:程序博客网 时间:2024/05/18 09:13
还是先看一下sudo 的配置文件:
/etc/sudoers
root@a05scpgapp01/etc>cat sudoers
#s file MUST be edited with the 'visudo' command as root.
# Failure to use 'visudo' may result in syntax or file permission errors
# that prevent sudo from running.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
# User alias specification
User_Alias U_SYSADMIN_AIX = aaa, bbb, ccc (specify the login user and user sudo command)
# Cmnd alias specification
Cmnd_Alias C_AIX_COMMANDS_SET1 = /usr/bin/ls,/usr/bin/cat,/usr/bin/showmount,/usr/bin/find,/usr/bin/du,/usr/bin/tar,/usr/bin/gzip,/usr/bin/compress,/usr/bin/uncompress,/usr/bin/gunzip,/usr/bin/nohup,/usr/bin/dsmc,/usr/bin/dsmadmc,/usr/bin/dsmcad,/opt/tivoli (specify the indirect command afer sudo which can be used)
Cmnd_Alias SUDOSUDO = /usr/local/bin/sudo,/usr/bin/sudo (specify the sudo installed path)
# Defaults specification
# Runas alias specification
Runas_Alias U_FUNCTION_SA = ibmsa, sudouser (sudo login brigde ID, exmple: sudo -u sudouser su -)
# User privilege specification
root ALL=(ALL) ALL
U_SYSADMIN_AIX ALL=(ALL) NOPASSWD:C_AIX_COMMANDS_SET1
U_SYSADMIN_AIX ALL=(U_FUNCTION_SA) NOPASSWD:/usr/bin/su
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
ALL ALL=!SUDOSUDO
#logging
Defaults syslog=auth
Defaults log_year, logfile=/var/log/sudo.log
root@a05scpgapp01/etc>
--------------------------------
When I used my personal Id to test:
error:
sudo not find:
solution:
Add the "path" into the personal ID path:
vi /home/id/.profile
add : /usr/local/bin to PATH
export PATH
make the .profile take effect: . .profile
sudo 对安全性还是很有好处的,对于login 的记录,可以看/var/log/sudo.log
- 减少root 的登入 : sudo
- fedora12 root 登入
- ubuntu root登入
- 用root登入图形界面
- ssh禁止root登入
- deepin配置root登入
- ubuntu登入root用户
- 禁止root利用ssh登入的设置
- ubuntu 12.04 开启root登入的方法
- 记录每个用户的 登入 和 记录他们的命令 (sudo 也适用)
- fedora17无法root登入解决办法
- ftp工具root登入linux设置
- 用root直接登入Ubuntu 14.04
- non-root用户ssh登入centos
- ubuntu14 系统开机自动root登入
- Debian Linux 下获得Root权限以及使用Root登入图像界面的办法
- 忘记mysql的root密码的解决方法,密码没有错,但无法登入!
- sqlplus登入和plsql登入的区别
- 飞机的翅膀末尾为什么要翘起来
- Html客户端服务器控件
- 让应用程序不被任务管理器杀死...(获取系统权限)
- 设置手机LED的颜色和闪烁频率
- 《CPlusPlusPrimer》第四章编程源码——iStack类的简单实现
- 减少root 的登入 : sudo
- Winpcap 教程
- I2C总线驱动
- 存储过程:一次性执行成批的SQL语句
- myeclipse发布项目导出
- STL中list的使用(理论)
- Fedora关闭/禁用SELinux三种方法
- install google-earth and fix ugly fonts in ubuntu 11.04
- 常用嵌入式资源