From: Duane Attaway (dattaway@attaway.net)
Date: 12/06/02


Date: Fri, 6 Dec 2002 11:59:25 -0600
From: Duane Attaway <dattaway@attaway.net>
Subject: Re: error opening shadow group file
Message-ID: <Pine.LNX.4.44.0212061153480.2677-100000@attaway.net>

On 6 Dec 2002, Brad Crotchett wrote:

> I have a server that I cannot add users to. Anytime I run useradd or
> adduser I get the error: 'useradd: error opening shadow group file'.
> When I look in /etc I have the following files:
>
> group
> group.lock
> gshadow
> gshadow.lock
> shadow
> shadow.lock
> mpasswd
> passwd
> passwd.lock
>
> I blow away all of the lock files and try again, but I get the same
> error and the lock files reappear. Anyone seen this before?

I'd first see if another process currently has the shadow password file
open with the fuser command:

fuser /etc/group*
fuser /etc/gshadow*
etc...

and if fuser returns a number, you have a winner. Also, check to see if
those files have the immutable bit set:

lsattr /etc/group*
...

My system uses /etc/group- as the shadow file.

--
Why drive a car when you can ride a bike?
http://attaway.net