[Samba] Add users to samba using a list.

L.P.H. van Belle belle at bazuin.nl
Wed May 6 02:15:45 MDT 2015

i use the following, just and example for adding multiple users.  

cat /home/samba/backups/users.csv | awk -F ";" '{system("/usr/bin/samba-tool user create "$5" --mail-address="$7" \
--given-name="$2" --surname=\""$3"\" --telephone-number="$6" --department="$1" --description=\""$1"\" \
--userou=ou=Bazuin --random-password")}';




>-----Oorspronkelijk bericht-----
>Van: rowlandpenny at googlemail.com 
>[mailto:samba-bounces at lists.samba.org] Namens Rowland Penny
>Verzonden: woensdag 6 mei 2015 10:08
>Aan: samba at lists.samba.org
>Onderwerp: Re: [Samba] Add users to samba using a list.
>On 06/05/15 08:43, Joakim x wrote:
>> Hi! I'm trying to create a script wich allows me to add 
>users to samba based on a list.
>> The list got the structure:
>> user1
>> user2
>> user3
>> (one value on each line)
>> Is there a simple way to add these users (with home folders) 
>to the samba-system with the password
>> "BasicPassword" ?
>> Thanks :)
>You are probably going to have to write your own script, but, 
>from what 
>you have posted, it is hard to advise you further, what type of samba 
>install ? standalone server, NT-4 style PDC, AD DC or what ?
>To unsubscribe from this list go to the following URL and read the
>instructions:  https://lists.samba.org/mailman/options/samba

More information about the samba mailing list