在rhel6系统中,我使用本指南启用了fips:
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sect-Security_Guide-Federal_Standards_And_Regulations-Federal_Information_Processing_Standard.html
重新启动系统后,sudo条目不再工作。
进入sudoers:
example ALL=(ALL) ALL
命令使用sudo运行的示例:
sudo ls -l /root [sudo] password for example: /var/cache/.security.db: unable to flush: Permission denied sudo: PERM_ROOT: setresuid(0, -1, -1): Operation not permitted sudo: unable to open /var/db/sudo/example/2: Operation not permitted sudo: unable to send audit message: Operation not permitted sudo: unable to set supplementary group IDs: Operation not permitted sudo: unable to execute /bin/ls: Operation not permitted
使用sudo运行脚本的另一个错误,在sudoers中使用这个条目:
example ALL=/usr/local/bin/example_script.sh
结果:
sudo /usr/local/bin/example_script.sh [sudo] password for example: sudo: PERM_ROOT: setresuid(0, -1, -1): Operation not permitted sudo: unable to open /var/db/sudo/example/1: Operation not permitted sudo: unable to send audit message: Operation not permitted sudo: unable to set supplementary group IDs: Operation not permitted sudo: unable to execute /usr/local/bin/example_script.sh: Operation not
可能相关的日志条目:
examplehost sudo: pam_krb5[30799]: authentication succeeds for 'example' (example@exampledomain) examplehost sudo: example : unable to open /var/db/sudo/example/2 : Permission denied ; TTY=pts/2 ; PWD=/home/example ; USER=root ; COMMAND=/bin/ls -l /root examplehost example : TTY=pts/2 ; PWD=/home/example ; USER=root ; COMMAND=/bin/ls -l /root examplehost sudo: pam_keyinit(sudo:session): Unable to change GID to 0 temporarily examplehost su: pam_unix(su-l:session): session closed for user example examplehost su: pam_unix(su-l:session): session closed for user example
请注意,系统正在使用活动目录authentication。
我尝试移动/ var / db / sudo和/var/cache/.security.db,没有任何效果。
现有的sudoers和新创build的条目都受到影响。 我环顾四周,但还没有find任何解决scheme。 系统工作正常否则,它接受SSHlogin,networking服务器也运行。
限制看起来很好:
ulimit -u 31353 cat /etc/security/limits.d/90-nproc.conf * soft nproc 1024 root soft nproc unlimited
问题是使用了一个pam模块,负责caching密码,允许某人login,以防远程活动目录服务器无法访问。 这个模块在rhel6以后不再出现。 但是,如果从自定义软件包或旧的rhel5软件包安装,仍然可以使用它。
这个软件包是pam_ccreds,在包含stringpam_ccreds.so的 /etc/pam.d/system-auth中的行被replace为stringpam_krb5.so后, sudo又开始工作了。