We have this error message saying
Permission Denied
when attempt to change its own password as root user
the /etc/passwd is there and intact
there is another file /etc/passwd- in the same folder
Not sure what is the implications
We have tried reboot the server , however the error still persists
Permission Denied when change password even as root
Re: Permission Denied when change password even as root
Despite its name, /etc/passwd is not used for storing passwords. For that you want /etc/shadow which should look like:
Code: Select all
[root@centos7 ~]# ls -laZ /etc/shadow
----------. root root system_u:object_r:shadow_t:s0 /etc/shadow
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
-
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
Re: Permission Denied when change password even as root
I have seen similar behavior in this forum.
Run and immediately try to save .
If it fails - find the offending line and fix it.
Also, check the SELINUX context of :
If they deviate from standards -> run a to fix the files.
Run
Code: Select all
vipw
If it fails - find the offending line and fix it.
Also, check the SELINUX context of :
Code: Select all
ls -lZ /etc/{passwd*,shadow*}
Code: Select all
restorecon