if (want_bindpw && passwd.bv_val == NULL ) {
/* handle bind password */
- fprintf( stderr, "Bind DN: %s\n", binddn );
+ if( binddn != NULL ) {
+ fprintf( stderr, "Bind DN: %s\n", binddn );
+ }
passwd.bv_val = strdup( getpassphrase("Enter bind password: "));
passwd.bv_len = passwd.bv_val ? strlen( passwd.bv_val ) : 0;
}
[\c
.BR \-C ]
[\c
-.BI \-D \ binddn\fR
+.BI \-D \ binddn\fR]
[\c
.BI \-d \ debuglevel\fR]
[\c
.TP
.BI \-D \ binddn
Use the Distinguished Name \fIbinddn\fP to bind to the LDAP directory.
-This flag is not optional. The user DN will be used if the
-bind DN is not provided.
.TP
.BI \-d \ debuglevel
Set the LDAP debugging level to \fIdebuglevel\fP.