userdel: cannot lock /etc/passwd; (Tried many things, can't fix)
For some reason, I cannot delete users from my server. (see error below) I have tried the following things, with no luck... Anyone have any ideas?
- mount –o remount,rw /
- deleting .lock files
- checking for open processes to the passwd file
- modifying the file directly
- making sure I had enough space
- rebooting
[root@host1 etc]# userdel vscanuser
userdel: /etc/passwd.6356: Permission denied
userdel: cannot lock /etc/passwd; try again later.
Linux host1@xyz.com 3.10.0-1160.53.1.el7.x86_64 #1 SMP Thu Dec 16 10:19:28 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux