SUMMARY: admin lock on login

From: Tom Linden <tom_at_kednos.com>
Date: Mon, 25 Aug 2003 08:53:17 -0700

Thanks to Tom Blinn

>-----Original Message-----
>From: Dr Thomas.Blinn_at_HP.com [mailto:tpb_at_doctor.zk3.dec.com]
>Sent: Monday, August 25, 2003 8:18 AM
>To: Tom Linden
>Subject: Re: admin lock on login
>
>
>
>> Apparently my passwd expired and upon entering the new passwd the second
>> time I must have made a typo and now can't login. Moreover,
>this was done
>> from telnet (Putty on W2K) and it simply blows the screen away
>>
>> I tried usermod to remove lock, and...
>>
>> # usermod -x administrative_lock_applied=0 tom
>> useradd: Am /etc/.AM_is_running Account Manager lock file has
>been detected.
>> This may indicate one of the following process with
>> process-ID 924 is using the Account Manager databases.
>>
>> dxaccounts useradd usermod userdel
>> groupadd groupmod groupdel
>>
>> Please remove the lock file if the process does not exist
>> and re-start the Account Manager.
>>
>>
>> OK, the process does not exist so,
>> 1. How do I find the lock file so I can remove it?
>> 2. How do I restart the Account Manager?
>>
>> This seems unnecessarily complicated to me. Moreover, having mistakenly
>> reentered the new password shouldn't have triggered such a
>series of events.
>
>The full path to the file is in the message:
>
> /etc/.AM_is_running
>
> There is only one line in the file, and it is the process id referred to
> in the original message,
> # more /etc/.AM_is_running
> 924
> #

Right, so it's probably safe to just completely remove the file and
re-issue the command.

Unfortunately, the various "account management" utilities need to go
off and muck with things in the file system, and there is no simple
way to provide a good interlock mechanism, especially because you can
use them over the network in some cases. And although some of them
are CLIs so they tend to get in, do their work, and exit, there is
the GUI account manager utility, and once it's started, at least some
people tend to leave it running. And if it's running, you don't want
to let someone else start up a copy, because then you get into messy
cases where "what you see isn't what's on disk". So the people who
implemented this stuff (not me, I had nothing to do with it) came up
with the idea of having a lock file. They used to just tell you the
file was there and never give the full path -- that's been fixed, but
there is still no automated way to verify that it's safe to remove
the file and start up a new instance of the GUI or alternatively to
issue the command line commands.

Yes, it's ugly, but it's not likely to change, ever, since there are
few people left working on the product who would be willing to risk
breaking it in trying to make it cleaner.>Unfortunately, in some cases, if
one of the applications that uses the
>file gets terminated abnormally, it may not clean up the file. So you
>have to get rid of it manually.
>
>You're right, it shouldn't be that hard.
>
>The account manager you want to restart is probably just the "usermod"
>command line command you were trying to use.
>
>Tom

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.511 / Virus Database: 308 - Release Date: 8/18/2003
Received on Mon Aug 25 2003 - 15:59:18 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:44 NZDT