The passwd utility creates /etc/.pwlock to indicate to other
instances of passwd that the password file is currently being modified.
When passwd finishes, it removes the lock file.
If you're the system administrator, and you need to edit the account files, you should:
- Lock the password database: if the /etc/.pwlock file doesn't
exist, lock the account files by creating it; if it does exist, wait until it's gone.
- Open the appropriate file or files, using the text editor of your choice, and make
the necessary changes.
- Unlock the password database by removing /etc/.pwlock.