报错代码:
SIOCADDRT: File Exists
解决方法:
确保以下目录中,网卡配置文件的 IP 地址只出现过了 1 次
/etc/sysconfig/network-scripts
SIOCADDRT: File Exists
确保以下目录中,网卡配置文件的 IP 地址只出现过了 1 次
/etc/sysconfig/network-scripts
[error] [/....../system-auth] has unexpected content!
[error] [/....../password-auth] has unexpected content!
[error] [/....../nsswitch.conf] has unexpected content!
[error] Unexpected changes to the configuration were detected.
[error] Refusing to activate profile unless those changes are removed or overwrite is requested.
Some unexpected changes to the configuration were detected. Use 'select' command instead.
# mv /etc/authselect/custom/password-policy /etc/authselect/custom/password-policy-backup
# authselect create-profile password-policy -b sssd --symlink-meta --symlink-pam
# authselect select custom/password-policy with-sudo with-faillock without-nullok with-mkhomedir --force
# dnf install oddjob ; systemctl enable --now oddjobd.service
# authselect apply-changes
setfacl: ......: Operation not supported
# mount -o remount,acl /mnt
(补充:这里以给挂载的 /mnt 目录添加 acl 参数为例)
# vi /etc/fstab
将部分内容修改如下:
......
/dev/sda5 /mnt xfs defaults,acl 0 0
......
(补充:这里以给从硬盘 /dev/sda5 挂载到 /mnt 目录的目录添加 acl 参数为例)
/etc/ld.so.conf
# gourpadd whocansu
(补充:这里以创建组 whocansu 为例)
# usermod -a -G whocansu zhumingyu
或者:
# usermod -aG whocansu zhumingyu
(补充:这里以将用户 zhumingyu 添加到 whocansu 组为例)
# vim /etc/pam.d/su
在此行下面:
......
# Uncomment the following line to require a user to be in the "wheel" group.
......
将以下内容
......
# auth required pam_wheel.so use_uid
......
修改为:
......
auth required pam_wheel.so use_uid group=whocansu
......
(补充:这里以只允许组 whocansu 可以使用 su 命令为例)
(
注意:
1) 此时如果用户有 sudo su 权限的话,那么依旧可以通过 sudo su 命令切换到 root
2) RockyLinux & RHEL 的 /etc/pam.d/su 文件里的每行都有严格的顺序,如果顺序错误,则所有用户都将不能再使用 su 命令,包括 sudo su 命令
)