pdbedit fails to export user data
Issue
- pdbedit fails to export user data. Please see below.
# pdbedit -e smbpasswd:/root/smb-users.backup build_sam_pass: Failing attempt to store user with non-uid based user RID. smbpasswd_update_sam_account: build_smb_pass failed! Importing account for root...failed - According to the source code of samba, pdbedit appears to fail when the value of RID is an odd number. Please see below.
source3/passdb/passdb.c --------------------------------------------------------------------------- 565 bool algorithmic_pdb_rid_is_user(uint32 rid) 566 { 567 if ( rid_is_well_known(rid) ) { 568 /* 569 * The only well known user RIDs are DOMAIN_USER_RID_ADMIN 570 * and DOMAIN_USER_RID_GUEST. 571 */ 572 if(rid == DOMAIN_USER_RID_ADMIN || rid == DOMAIN_USER_RID_GUEST) 573 return True; 574 } else if((rid & RID_TYPE_MASK) == USER_RID_TYPE) { /* When rid is an odd number, False is returned. */ 575 return True; 576 } 577 return False; 578 } --------------------------------------------------------------------------- - Could you please let us know why pdbedit processes the RID like that? If that behavior is due to a bug, could you fix it?
Environment
- Red Hat Enterprise Linux 6
- samba-3.5.4-68.el6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
