user deletion problem

Rashkae ubuntu at tigershaunt.com
Thu Oct 13 14:58:42 UTC 2011


On 10/13/2011 10:47 AM, Rashkae wrote:
> On 10/13/2011 10:38 AM, PM wrote:
>>> That user is no longer listed in /etc/passwd?
>>>
>> Here is the complete history and error details:
>>
>> myfamily at myfamily-desktop:~$ userdel -f linuxworld
>> userdel: cannot lock /etc/passwd; try again later.
>> myfamily at myfamily-desktop:~$ sudo userdel -f linuxworld
>> [sudo] password for myfamily:
>> userdel: cannot lock /etc/gshadow; try again later.
>>
>> The error I am getting is this one. And the user to be deleted is
>> 'linuxworld'
>>
> http://xkcd.com/149/
>
> Admittedly, the error message isn't very intuitive.
>
>
And err, wow, complete failure on my part to read your entire log...


This is probably a lock file, which may or may not be stale..

run:

ls /etc/*.lock and you should find that there is a passwd.lock and or a 
gshadow.lock file.  If so, have a look in them to get the PID of the 
process that created the lock file.

ex: cat /etc/gshadow.lock

Then find out if that PID is still in use (and if it's something that 
should have a lock on your shadow files)

ps -e | grep pid_number  (whatever the pid was in the lock file)

Let us know what you find.







More information about the ubuntu-users mailing list