useradd: cannot rewrite shadow password file

【OS】RHEL_AS4

【问题】root用户执行useradd命令报错,如下:

[root@localhost etc]# useradd efps4

useradd: cannot rewrite shadow password file

[root@localhost etc]# userdel efps4
userdel: error deleting shadow password entry

【解决】执行restorecon,如下:

[root@localhost etc]# restorecon /etc/shadow

原文地址:https://www.cnblogs.com/muyuetiankong/p/2264396.html