diff --git a/src/auth.c b/src/auth.c
index a049076a..77f4eed5 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -258,8 +258,14 @@ int auth_verify_password_ldap(LOGBOOK *lbs, const char *user, const char *passwo
ldap_ld = NULL;
memset(&ldap_bindDN[0], 0, sizeof(ldap_bindDN));
-
- if(!ldap_init(lbs,error_str,error_size)) {
+
+ if (!strcmp(password, "")) {
+ strlcpy(error_str, "LDAP authentication failed, no password provided", error_size);
+ write_logfile(lbs, "LDAP authentication failed, no password provided");
+ return FALSE;
+ }
+
+ if (!ldap_init(lbs,error_str, error_size)) {
strlcpy(error_str, "LDAP initialization error
", error_size);
strlcat(error_str, "
Please check your LDAP configuration.", error_size);
return FALSE;