1、CentOS 修改root密码时报错:
/usr/share/cracklib/pw_dict.pwd: No such file or directory PWOpen: No such file or directory
这是因为缺少某些lib库。解决办法:
yum install cracklib-dicts
或 yum reinstall cracklib-dicts
2、试着执行一下 passwd 命令,由于 SELinux 的原因,通常会出现下面的错误
# passwd
passwd: unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 is not authorized to change the password of root
为了让 passwd 正常工作,请禁用 SELinux:
# setenforce 0
如果想永久的禁用 SELinux,请执行:
# cat > /etc/selinux/config << EOF
SELINUX=disabled
SELINUXTYPE=targeted
EOF
# ln -s /etc/selinux/config /etc/sysconfig/selinux
好了,试试重置 root 用户的密码吧:
# passwd
Linux单用户模式修改root密码:http://www.linuxdiyf.com/linux/8503.html
Linux mysql安装修改root密码服务:http://www.linuxdiyf.com/linux/251.html
Ubuntu下MySQL忘记root密码重置:http://www.linuxdiyf.com/linux/13666.html
VMware下安装Ubuntu15.04后设置root密码:http://www.linuxdiyf.com/linux/13174.html
Ubuntu 14.04忘记root密码的解决方法:http://www.linuxdiyf.com/linux/12288.html