Ubuntu添加组或用户出现如下错误:

       useradd: failure while writing changes to /etc/passwd

       useradd:将更改写入 /etc/passwd 时失败

一般是由于selinux引起的问题,解决方式是关闭selinux,方法如下:

修改/etc/selinux/config,将SELINUX改为disabled。

 

参考文章:

1. CentOS下彻底删除SELinux的方法

2. Useradd/groupadd fails: failure while writing changes to /etc/passwd and /etc/group. Contexts problem 

3. linux下新增和删除用户时报无法更改passwd的错误

Logo

更多推荐