[Samba] net rpc user add produces duplicate SID

Sebastian Scholz gsscholz at gmail.com
Thu Jan 21 07:28:43 MST 2010


Sebastian Scholz <gsscholz <at> gmail.com> writes:

> 
> Sebastian Scholz <gsscholz <at> gmail.com> writes:
> 
> > 
> 
> > I moved the domain SID and the local SID to the new pdc and filled the ldap
> > directory with all users and machines from the old machine. I can access  
> > the smb via smbclient, id user works and getent passwd, etc. 
> > 
> > BUT when I try to add a new user with 
> > # net rpc user add newusername 
> > the user gets a SID which is already used by a machine account. The command
> > responds with "Faild to add user 'newusername' with: No such user."
> > # pdbedit -L 
> > reports this user and this machine account with ldapsam_getsampwsid: More 
> > than one user with SID [S-1-5-21....]. Failing. count=2. Deleting the user 
> > with
> > # net rpc user delete newusername 
> > works.
> > 
> 
> Hi List
> 
> the same actually happens when I add a new machine to the domain with
> net dom join
> 
> Can I change the SID/RID somehow after adding a new account or is there a 
> way to tell net to start from a different RID?
> 
> Thanks
> Sebastian
> 

Me again,

I hot fixed the problem for me by adding and deleting a dummy user a couple of
times:

# for i in `seq 0 50 ` ; do 
#  net rpc user add username  -U root%geheim
#  net rpc user delete username -U root%geheim
# done

but I still guess this is a bug in the net command.

Regards
Sebastian





More information about the samba mailing list