The Samba-Bugzilla – Bug 1842
Can't delete a user from smbpasswd(5) if already deleted from /etc/passwd (or NIS)
Last modified: 2005-08-24 10:20:54 UTC
When trying to delete a dead user from smbpasswd (using "smbpasswd -x") I get
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.
working in 3.0.11 (fixed in a ealier release although I'm not sure which one).
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.