[Samba] mass user creation

Patrick DUBAU patrick.dubau at alsace.iufm.fr
Mon Jan 31 15:26:35 GMT 2005


Hi,

i plan to mass creat user in ldap to use with samba

I tried with ldiff like the structure below, the user is created but no 
home directory is created, user in not member on any groups.
1) how to do with ldiff file to put a user member of a group ?

So i plan to use smbldap-useradd => home drectorie is created with the 
appropriated rights, user is member of "Domain Users" : Great !
My goal is to creat a script that will,  for each user in a text file, 
call smbldap-useradd. I think that this won't be too difficult (any hint 
will be apreciated)
My problem is that i also want to generate a password with 
smbldap-passwd. But this script doesn't accept any parameters. It 
prompts for a password ...
2) Is there a solution to avoid this problem so that i also can generate 
mass user password ?

Thanks

Here's my ldiff :
dn:uid=pat.dub,ou=People,dc=samba,dc=alsace,dc=iufm,dc=fr
changetype: add
objectClass: top
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
objectClass: sambaSAMAccount
cn: Pat Dub
sn: pat.dub
uid: pat.dub
uidNumber: 1001
gidNumber: 513
homeDirectory: /home/admin/strasbourg/pat.dub
loginShell: /bin/false
gecos: Pat DUB
description: Pat DUB
sambaPwdLastSet: 1106131176
sambaLogonTime: 0
sambaLogoffTime: 2147483647
sambaKickoffTime: 2147483647
sambaPwdCanChange: 0
sambaPwdMustChange: 2052116073
displayName: Pat DUB
sambaAcctFlags: [UX]
sambaSID: S-1-5-21-3283536956-439905991-814256716-5000
sambaPrimaryGroupSID: S-1-5-21-3283536956-439905991-814256716-513
sambaNTPassword: 9ABB609276FF0C69184CC4766A8ED206
sambaLogonScript: logon.bat
userPassword: {SSHA}bgyoqB7fFClEfmqdPaZnIZh/41t6xJO3
sambaHomeDrive: p:




More information about the samba mailing list