[Samba] Next uid with sambaUnixIdPool

sisu . npillao at hotmail.com
Tue Jan 11 04:03:06 MST 2011


Hi all,

I have a doubt trying to set the users' RID since when I  join a machine into the domain through smbldap-useradd, this script queries  to my domain what is the next uid number available (uidpool) and then add +1 to that uid for the next time. It is ok, the problem is when I want to create a posix sam account through PHPLdapAdmin, since I try it:

<attribute id="sambaSID">
    <display>Samba SID</display>
      <value>S-1-5-21-2019295574XXXXXXXXXXXX</value>  
    <helper>
      <id>sidsuffix</id>
      <value>=php.GetNextNumber(/,uid,true,(&amp;(objectClass=sambaDomain)(sambaDomainName=domain_name)),*2;+1000)</value>
    </helper>
    <post>=php.Join(-,(%sambaSID%,%sidsuffix%))</post>
    <page>1</page>
        <order>23</order>
</attribute>

As you see, on the sidsuffix section, I try to query to (objectClass=sambaDomain)(sambaDomainName=domain_name) (my domain) what is the its uid and then with the true flag I try to add 1 the next uid for the next time and finally I calculate the RID *2;+1000. But it doesn't work since the value that I get is an autosearch.

Any advice will be really appreciate.


 		 	   		  


More information about the samba mailing list