Hi! I've a working samba PDC with a ldap backend configured. I've tried to add some users to samba with smbpasswd -a command but I encountered a little problem. I've made a script that reads a file with user and password info and executes the following line: smpasswd -a $user $pass The problem that I encountered was that I had this information on two files. The first one I added without any problems but the second it started to say this: smbpasswd -a $user $pass ldapsam_add_sam_account: SID 'S-1-5-21-3317586490-762025270-1437560638-12520' already in the base, with samba attributes Failed to add entry for user $user. Failed to modify password entry for user $user In fact if i do an ldap search the sid already exists for another user added in the first file. Why is samba using the same SID's? Pedro Silva
Pedro Silva wrote:> smbpasswd -a $user $pass > ldapsam_add_sam_account: SID > 'S-1-5-21-3317586490-762025270-1437560638-12520' already in the base, > with samba attributes > Failed to add entry for user $user. > Failed to modify password entry for user $userMy guess is that your "add user script" generates 2-nd UNIX user with the same uid=5760. If you have "add user script" Samba will calculate RID (the value after the last '-' in the SID) as: "(uid*2) + rid_offset". This rid_offset can be changed with "algorithmic rid base" smb.conf parameter but is usually left as 1000. The first part of the SID is the SID of your Domain. Hope it helps, Igor