When FS goes RO and passwd file gets locked

Or, simply said, when file system goes read-only :
I had to open a new account on RHEL, when I got this :
# useradd -s /bin/bash user4
useradd: unable to lock password file
That is easily solved, delete the lock file (group.lock, gshadow.lock, passwd.lock, shadow.lock, .pwck.lock, .pwd.lock), BUT :
# rm -rf .pwd.lock
rm: cannot remove `.pwd.lock’: Read-only file system
Cvrc (or othewise put : no go)!
# mount -o remount,rw ‘/’
mount: block device /dev/sda2 is write-protected, mounting read-only
That does not work either.
I check how FS is mounted :
# mount
/dev/sda2 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
/dev/sda3 on /home type ext3 (rw)
/dev/sda5 on /var/log type ext3 (rw)
And here is all OK.
And in the end I had to restart the whole server…..

This entry was posted in Linux and tagged , . Bookmark the permalink.

Comments are closed.