Linux, Tutorials

passwd command not working : Unexpected failure. Password database unchanged.

Error –

Tried to reset my password, it throws error as below.
Logged in as root and tried, still throwing the same error.

bash-2.05# passwd lotus
New Password:
Re-enter new Password:
passwd: Unexpected failure. Password database unchanged.
Permission denied
bash-2.05# useradd test
UX: useradd: ERROR: Cannot update system files – login cannot be created.

Solution : –

This error occurs when your root ( / ) is full. Check using df –h

bash-2.05# df -h
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d0 3.9G 3.9G 0K 100% /
/dev/md/dsk/d40 4.8G 1.5G 3.3G 32% /usr
fd 0K 0K 0K 0% /dev/fd
/dev/md/dsk/d30 3.9G 469M 3.4G 12% /var
swap 6.5G 176K 6.5G 1% /var/run
swap 6.5G 136K 6.5G 1% /tmp
/dev/md/dsk/d120 20G 19G 302M 99% /opt

Root is 100% full, remove or move the files that are not required in root directory.

Check again, it will work!