[Samba] mass user creation

Paul Gienger pgienger at ae-solutions.com
Mon Jan 31 15:40:35 GMT 2005


> 1) how to do with ldiff file to put a user member of a group ?

You have the gid specified so that will get your primary group, adding 
secondary groups is not as easy though.  The secondary groups you are a 
member of is stored in the group, via the multi-value property 
memberUID.  You'll have to ldapmodify the groups you want to be a member 
of with the appropriate member's uid.

> 2) Is there a solution to avoid this problem so that i also can 
> generate mass user password ?

You could pipe your script, depending on the language, into the 
smbpasswd command.  I believe Jerry has posted something like this for a 
shell language:
echo $pass $pass > smbpasswd -a $username

Also, you may want to leave off your samba parameters in the ldif, they 
will get added by the smbpasswd command.

-- 
--
Paul Gienger                    Office: 701-281-1884
Applied Engineering Inc.
Systems Architect               Fax:    701-281-1322
URL: www.ae-solutions.com       mailto: pgienger at ae-solutions.com





More information about the samba mailing list