LDAP authentication on SBS2003 with Fortigate
1. Run dsquery on the Microsoft LDAP server and find the line of username "Administrator". The output should look like:
CN=Administrator,CN=Users,DC=example,DC=com
2. Login using SSH to the FG unit and setup the following attributes:
3. Enter to the LDAP config:
FGT# config user ldap
4. Name of the LDAP Server profile:
FGT# edit "LDAP-Server"
5. IP of the LDAP server
FGT# set server "192.168.11.10"
6. Set the cnid always with "sAMAccountName"
FGT# set cnid "sAMAccountName"
7. Set the dn attribute where to search the LDAP users (usually under OU=Users)
* In Microsoft SBS server its should be set as " OU=SBSUsers,OU=Users,OU=MyBusiness,DC=example,DC=com"
FGT# set dn "OU=Users,DC=example,DC=com"
Set the type to authenticated username/password
FGT# set type regular
8. Set the username with administrative rights to bind the LDAP
FGT# set username "CN=Administrator,CN=Users,DC=example,DC=com"
9. Set the password of the username
FGT# set password 123456789
10. Quit from config mode
FGT# next end
11. The output should look like this:
FGT# show user ldap
config user ldap
edit "LDAP-Server"
set server "192.168.11.10"
set cnid "sAMAccountName"
set dn "OU=SBSUsers,OU=Users,OU=MyBusiness,DC=example,DC=com"
set type regular
set username "CN=Administrator,CN=Users,DC=example,DC=com"
set password ENC AADoA/bD99GGHHrGrjDth6I5vyxykAudinjFdy11WIqA4BkD7zvC8zh9rRpxyqwCc/w/pyES40IdJsYSUekLpg1567QYtzBr2TCl/r7v3lhtMy7q
next
end
12. Testing the connection to ldap server.
diag debug enable
diag debug application fnbamd -1
diagnose test authserver ldap LDAP-Server [username] [password]
