I’ve found how to create/import multiple ou’s at once using a script
- Create a script file, save with name create_ou.sh
#!/bin/bash
#ls --format=single-columnfilename=‘ou_add.csv’
while IFS=, read -a csv_line;
do
samba-tool ou create ou=${csv_line},ou=Sentra\ Inovasi\ Solusi,dc=ad,dc=sentrainovasi,dc=com
done < $filename
exit 0
- Create a csv file containing a list of ou to be created
IT
Marketing
Admin
- run command
#chmod +x create_ou.sh
- run script by command
./create_ou.sh
done.
Thanks.