Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
4  
ls -l /etc/.pwd.lock or strace -e open vipw, after that you can delete the lock file –  c4f4t0r Mar 9 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 at 14:14
1  
this is one of the reasons I use tmux –  Michael Martinez Apr 1 at 22:47

1 Answer 1

up vote 9 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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