[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Can't lock password file



Thanks. Aparently the proccess# in that file was X. though I could
delete the file with no problem...

and X works perfectly... I'll look at the logs tomorrow to see what
happend.

Thanks a lot.

El dom, 22 de 06 de 2003 a las 22:14, Bob McClure Jr escribió:
> On Sun, Jun 22, 2003 at 09:21:10PM -0400, Alan Bort wrote:
> > I have problems creating a User: here is my output:
> > 
> > 
> > [root gandalf etc]# useradd guest
> > useradd: unable to lock password file
> > 
> > 
> > the permissions on the relevant files:
> > 
> > -rw-r--r--    1 root     root         1807 jun 22 14:43 passwd
> > -rw-------    1 root     root         1770 jun 22 05:03 passwd-
> > -rw-------    1 root     root            5 jun 22 14:43 passwd.lock
> > -r--------    1 root     root          554 jun 22 14:43 gshadow
> > -rw-------    1 root     root          545 jun 22 05:03 gshadow-
> > -rw-------    1 root     root            5 jun 22 14:43 gshadow.lock
> > -r--------    1 root     root         1141 jun 22 14:43 shadow
> > -rw-------    1 root     root         1082 jun 22 05:03 shadow-
> > -rw-------    1 root     root            5 jun 22 14:43 shadow.lock
> > 
> > I've installed RH five hours ago... and this is the second user I'm
> > trying to create... the first one worked perfectly... what could be
> > happening???
> 
> It looks like the previous attempt to add a user completed, but failed
> to remove its lock files.
> 
> > Thanks a lot.
> > 
> > PS: what is to lock password file?
> 
> Lock files are used to prevent different programs from attempting to
> modify a file at the same time.  These lock files probably contain the
> Process ID (PID) of the program that created them.  If the program is
> no longer running, you can remove them.
> 
> To see if the process still exists:
> 
>   kill -s 0 `cat /etc/passwd.lock`
> 
> (That (`) is the "backtick" or "accent grave", next to the "1" key in
> the upper left of your keyboard.)  That sends a signal 0 (are you
> there) to the process.  If it's not there it reports, "No such
> process".  If it still exists, no report is given.
> 
> If it's not there, then you can
> 
>   rm /etc/passwd.lock
>   rm /etc/gshadow.lock
>   rm /etc/shadow.lock
> 
> or, more succinctly
> 
>   rm /etc/{passwd,{g,}shadow}.lock
> 
> You will need to hit "y" when it asks to confirm each removal.
> 
> > -- 
> > Alan Bort
> > Linux Registered User 298277 -Country Manager- [http://counter.li.org]
> > [ http://www.linuxquestions.org ] Username: Ciccio
> > [ http://es.tldp.org ]
> > Ciccio.-
> 
> Cheers,
-- 
Alan Bort
Linux Registered User 298277 -Country Manager- [http://counter.li.org]
[ http://www.linuxquestions.org ] Username: Ciccio
[ http://es.tldp.org ]
Ciccio.-




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]