Bug 1842 - Can't delete a user from smbpasswd(5) if already deleted from /etc/passwd (or NIS)
Summary: Can't delete a user from smbpasswd(5) if already deleted from /etc/passwd (or...
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: User/Group Accounts (show other bugs)
Version: 3.0.6
Hardware: All All
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-28 07:48 UTC by Mac
Modified: 2005-08-24 10:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mac 2004-09-28 07:48:17 UTC
When trying to delete a dead user from smbpasswd (using "smbpasswd -x") I get 
the error:-

build_sam_account: smbpasswd database is corrupt!  username jhurst with uid 1774
 is not in unix passwd database!
Failed to initialise SAM_ACCOUNT for user jhurst. Does this user exist in the 
UNIX password database ?
Failed to modify password entry for user jhurst


This makes a certain ammount of sense (i.e. the smbpasswd binary checks that
any user it's working on is in the smbpasswd-file).  But it's an overly zealous 
check when deleting!

Steps to replicate:-

Find a user who's in both /etc/passwd (or NIS) and smbpasswd(5) (If neccessayr 
create with "smbpasswd -a fred")
Delete the user from /etc/passwd (or NIS).  Check with 'finger' or equivalent.

Try 'smbpasswd -x fred' and error will occur.
Comment 1 Gerald (Jerry) Carter (dead mail address) 2005-02-11 09:17:35 UTC
working in 3.0.11 (fixed in a ealier release although I'm not sure which one).
Comment 2 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:20:54 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.