So how can one easly import large number of users directly from the AD?
By using the LDAP auth option. It took me few hours to get it working, actually I still dont have it 100% working because I can not yet import it, but I can list then 🙂
Administration>Options>LDAP
Make special attention to the
User to search (anonymous if empty) shuold be:
DOMAINNAMEUSERNAME
Then now we should be able to import the users from the AD.
Configuration>Users>Contacts>LDAP Import
Copy and paste the Active Directory : (&(objectClass=user)(samaccounttype=805306368)(objectCategory=person)(cn=*))
Click on import and you should get a List of users with
the following Attributes:
“givenname”, “mail”, “uid”, “cn”, “sn”, “samaccountname”
The problem, if one of those attributes are not set the user will not be able to be imported!!!
Another problem people have commented has to do with the use of strange characters: é ç â etc..
More info here
Another good tip is to raise the log level by going to:
Administration>Option>Debuging>LDAP On
# tail -f /usr/local/centreon/log/ldapseach.log
[17/12/2009 12:24] LDAP Search : (&(objectClass=user)(samaccounttype=805306368)(objectCategory=person)(cn=*))
[17/12/2009 12:24] LDAP Search : URI : ldap://master.local:389
[17/12/2009 12:24] LDAP Search : Credentials : masterfferreira :: password123124
[17/12/2009 12:24] LDAP Search : Bind : 0
[17/12/2009 12:24] LDAP Search : Bind OK
[17/12/2009 12:24] LDAP Search : Base DN : DC=MASTER,DC=LOCAL
[17/12/2009 12:24] LDAP Search : Filter : (&(objectClass=user)(samaccounttype=805306368)(objectCategory=person)(cn=*))
[17/12/2009 12:24] LDAP Search : Size Limit : 60
[17/12/2009 12:24] LDAP Search : Timeout : 60
[17/12/2009 12:25] LDAP Search : Error : Unknown error
[17/12/2009 12:25] LDAP Search : 60 entries found
great post about this.
I ran into the problem that when I entered SamAccountName as the login attribute it would not let me import anything.
I took at look at the bug you pointed out in the thread and noticed the code specifies “samaccountname” SO i change SamAccountName to samaccountname and all is well in the world again, UID is converted to samaccountname and you can import users as long as they have all attributes you mentioned