Showing results for 
Search instead for 
Did you mean: 

Errors locking accounts

Sally Devine
Frequent Advisor

Errors locking accounts

Hi everyone,

I am trying to lock some accounts (bin, sys, uucp, etc) using dxaccounts. I was able to lock a few of them and then I tried to lock the lp account and got the message:

Errors encountered while modifying the selected users
Errors encountered while modifying users
Cannot create backup copy of password file
Errors encountered while modifying users
File exists

Now, I cannot lock or unlock any account.

Ann Majeske
Honored Contributor

Re: Errors locking accounts

Hi Sally,

Are you running Base or Enhanced Security on the system? What version and patchkit? Are you distributing your accounts in any way (NIS, ldap, etc)?

One possibility given the error message, check for the file /etc/ptmp. If it's there (and you're sure that no one is currently attempting to modify the passwd database), this is probably your problem. The /etc/ptmp file is the temporary version of the /etc/passwd file that is created when the file is being modified. To be safe, I'd just change the name instead of deleting it, so that you could compare the contents with the /etc/passwd file later to make sure that no changes were lost.

Another lock file that gets created when running dxaccounts is /etc/AM_is_running,
so if you (and/or anyone else) are not running dxaccounts the /etc/AM_is_running file shouldn't be there either. But, usually if this file is there you can't even run dxaccounts.

Ralf Puchner
Honored Contributor

Re: Errors locking accounts

be sure the hashed databases (/etc/passwd.dir and /etc/passwd.pag) are in sync. Delete the files if the IS_RUNNING solution will not work.
Help() { FirstReadManual(urgently); Go_to_it;; }