Chapter 3 Authentication for FortiOS 5.0 : Authentication servers : LDAP servers : Troubleshooting LDAP : LDAP user test
  
LDAP user test
A quick way to see if the LDAP configuration is correct is to run a diagnose CLI command with LDAP user information. The following command tests with a user called netAdmin and a password of fortinet. If the configuration is correct the test will be successful.
FGT# diag test authserver ldap ldap_server netAdmin fortinet
'ldap_server' is not a valid ldap server name — an LDAP server by that name has not been configured on the FortiGate unit, check your spelling.
authenticate 'netAdmin' against 'ldap_server' failed! — the user netAdmin does not exist on ldap_server, check your spelling of both the user and sever and ensure the user has been configured on the FortiGate unit.