I was editing the passwd file with vipw, when I briefly lost internet connectivity. When I logged back in and tried to edit again I get the error:

vipw: Couldn't lock file: Interrupted system call
vipw: /etc/passwd is unchanged

I'm assuming this means the passwd file is still locked from the interruped time I was editing it. How can I fix this?

  • 4
    ls -l /etc/.pwd.lock or strace -e open vipw, after that you can delete the lock file – c4f4t0r Mar 9 '14 at 14:03
  • 2
    Thanks. I removed the .pwd.lock and passwd.lock files and that did it. Put you comment as an answer, and I'll mark it as the answer. – LoneWolfPR Mar 9 '14 at 14:14
  • 1
    this is one of the reasons I use tmux – Michael Martinez Apr 1 '14 at 22:47

You need to check if the /etc/.pwd.lock exists and if it's there rm /etc/.pwd.lock In this way you can solve your issue

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.