In this post I am not going to talk about setting up your LDAP using OpenLDAP. There are lots of websites explaining that. However when I tried to upload users in bulk into the directory I was not able to do the same. The reason there was not even a single article which could give me some information on the same. So here is how to do it. Environment: Ubuntu 10.04 Server OS, OpenLDAP with phpldapadmin. I had the user list with the first name and the last name and the email address. I converted this spreadsheet into a .CSV file. # sudo su - (only for convenience) # cat user-file.csv Krishnan, Sethuraman, krishnan@mydomain.com Anidha, Krishnan, anidha@mydomain.com Tanya, Krishnan, tanya@mydomain.com My requirement was to populate the following attributes in the LDAP. dn: uid=krishnan,ou=people,o=mycompany changetype: add objectClass: inetOrgPerson objectclass: top cn: Krishnan Sethuraman sn: Sethuraman uid: krishnan mail: krishnan@mydomain.com userPassword: gi
Comments
Post a Comment