[Samba] load password users in Ldap

Jose Antonio Gómez Muñoz jagomez at coam.org
Fri May 30 10:06:28 GMT 2003


Hello,

I'm new in Samba Ldap. I use samba-2.2.3a and openldap2-2.1.4-46.
I am going to load in Ldap a lot of users in a ldif file as it is shown below. But I don't know how to put samba password. I can use:

smbpasswd juan1

and then the fields lmPassword and ntPassword are changed. In this way, after load all users in Ldap I would need a script to do a smbpasswd for each user automatically, without prompt me for each one. ¿ How can I do to avoid prompting me ?

I think it is better to put the real password in lmPassword and ntPassword but it doesn't work. Which is the easiest method to put the samba password in the load process?

ldif file
==============

dn: uid=juan1, ou=smb, dc=Colegio Oficial de Arquitectos de Madrid, dc=es
cn: juan1
objectClass: sambaAccount
objectClass: posixAccount
uid: juan1
pwdLastSet: 0
logonTime: 0
logoffTime: 2147483647
kickoffTime: 2147483647
pwdCanChange: 0
pwdMustChange: 2147483647
userPassword: hola
lmPassword: 37D5B8AB8069F5B8AB5B8AB8B8AB8069
ntPassword: 5B8AB8B8AB85B8A5B8AB8B8AB82BE319
acctFlags: [UX         ]
uidNumber: 1020
gidNumber: 1001
loginShell: /bin/bash
rid: 3040
primaryGroupID: 513
homeDirectory: /dev/null




/etc/samba/smb.conf
====================
ldap server = localhost
ldap port = 389 
ldap suffix = "ou=smb, dc=Colegio Oficial de Arquitectos de Madrid, dc=es"
ldap admin dn = "cn=Manager, dc=Colegio Oficial de Arquitectos de Madrid, dc=es"


Thanks very much.




More information about the samba mailing list