Can't add a user, exists. Can't delete does not exist.

Scott J. Henson scotth at
Mon Jul 18 13:38:46 UTC 2005

Dave Walker wrote:

> Scott Henson wrote:
>> Dave Walker wrote:
>>> Scott Henson wrote:
>>>> Dave Walker wrote:
>>>>> Ok I don't know how I got into this but something is broken.  A 
>>>>> user was having account problems so I was going to just re-create 
>>>>> the account.  I deleted the princ from Kerberos, and tried deluser 
>>>>> the_username.  I got:
>>>> What you need to do is 'getent passwd'
>>>> That command will tell you what the system sees as far as users 
>>>> go.  If you see your user in there, something other than 
>>>> /etc/passwd is providing that user.  You can check what is 
>>>> providing that user by /etc/nsswitch.conf.   Check the passwd 
>>>> line.  For a normal system it will have compat and files.  If 
>>>> anything else is on that line then youll have to remove the user 
>>>> from there.  If your using kerberos, you might see ldap on there.   
>>>> Other than that, I'm not sure why you would be getting that error.
>>> It does show the users in there... however my nsswitch.conf:
>>> passwd: files
>>> So, I got nothin.
>> Wow, thats odd.  I don't know of anything else that can affect nss.  
>> I work with nss on a regular basis and Ive never seen this.  Have you 
>> tried a reboot?  Maybe libc is confused about your fs view?  I don't 
>> know.  I'm stumped, sorry.
> Re...boot?  That's a term I have not heard in a while for 
> troubleshooting.  But, it seemed to act like windows and fix it.
> Is it sad, that rebooting to fix a problem did not even come to mind?

Well I figure you had a stall mount or something bind mounted on top of 
something else giving you and libc a different view of your fs.  So 
according to you the user existed in /etc/passwd, while according to 
libc the user was in there.  The reboot must have synced your view and 
libc's view.  If this is the case, there are other ways to undo the 
situation other than rebooting, rebooting, however is the simplest. 

More information about the ubuntu-users mailing list