[Samba] Create Organizational units (OU) from Unix.
rowlandpenny at googlemail.com
Mon Sep 22 11:22:58 MDT 2014
On 22/09/14 17:32, Prunk Dump wrote:
> Is there a way to create an OU (in the AD sence) from Unix with the
> samba tools ?
> I have made a script that create all my users and groups (for a
> school). But I still need to create the OUs manually from windows with
You need to script around an ldif similar to this:
You then add this with ldbmodify, but with one proviso, you can only
create one OU at a time unless you do it with multiple stanzas
i.e. using a DN of ou=secondou,ou=firstou,dc=home,dc=com would fail
unless ou=firstou,dc=home,dc=com already existed, but an ldif such as:
would work as firstou would be created before secondou.
More information about the samba