ldap.conf
<IfModule mod_ldap.c> # Connection information LDAPServer ldap://dc01.domain.com/??sub LDAPAttr uid sAMAccountName LDAPAuthBinds on # User information LDAPBindDN "cn=UserWithBindRights,cn=users,dc=domain,dc=com" "PasswordForUserWithBindRights" LDAPUsers OU=OuThatYouWantToSearchIn,dc=domain,dc=com (sAMAccountName=%u) # ID's to use when not using the ones from AD LDAPDefaultGID 1111 LDAPDefaultUID 1111 # Override the use of AD id's with the default values set. # Handy when using this setup with a web server that needs read and write
# access to the files and directories uploaded. LDAPForceDefaultGID on LDAPForceDefaultUID on # Switch on the functionality to generate user homes. LDAPGenerateHomedir on 0775 CreateHome on 0775 # Overide homedir values from AD LDAPGenerateHomedirPrefix /place/to/generate/user/homes LDAPForceGeneratedHomedir on </IfModule>
It's really important to add the ??sub after the server address. If you don't ProFTPD will use ??base instead and you will not get any results when searching AD. Remember to adjust the values before using this config.
Also you might want to note that the home directory that gets made using the username from AD and not the ones provided from the user, so if the username in AD is capitalized so will the homedir be. Will post a solution on how to fix this as well for the ones that require it.
Thank you! It was helpful for me today!
ReplyDeleteHave a nice day!
Thanks to you I didn't bang my head on the wall ! Thank you very much
ReplyDelete