Linux: Lost internet while using vipw. How can I unlock the file?

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?


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