userdel: cannot lock /etc/passwd; (Tried many things, can't fix)

Latest response

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?

  1. mount –o remount,rw /
  2. deleting .lock files
  3. checking for open processes to the passwd file
  4. modifying the file directly
  5. making sure I had enough space
  6. 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

Responses