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:

  1. 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.
  2. Open the appropriate file or files, using the text editor of your choice, and make the necessary changes.
  3. Unlock the password database by removing /etc/.pwlock.