You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, everybody,
Apologies if this isn't the right place to ask this, but I'm trying to write some code to add an entry to my example LDAP server. I'm hoping for the entry to have the attributes cn, ou, dc, and dc. I can connect to the database fine, but I get ' op=0 RESULT tag=105 err=2 text=no attributes provided' when I try to add the entry.
My code is:
var controls = []ldap.Control{}
func main() {
conn, err := ldap.DialURL("ldap://localhost:389")
...
} else {
newRequest := ldap.NewAddRequest("cn=tom,ou=users,dc=example,dc=org", controls)
conn.Add(newRequest)
}
}
I'm sure the issue is something to do with the controls I'm passing in (or lack thereof), but I'm pretty new to LDAP and relatively new to Go, so I'm not sure what I'm doing wrong. Is there some more detailed documentation anywhere I could read, or is there anything obvious I'm not getting right?
Thank you, and apologies if this isn't the right place to ask this.
The text was updated successfully, but these errors were encountered:
Hi, everybody,
Apologies if this isn't the right place to ask this, but I'm trying to write some code to add an entry to my example LDAP server. I'm hoping for the entry to have the attributes cn, ou, dc, and dc. I can connect to the database fine, but I get ' op=0 RESULT tag=105 err=2 text=no attributes provided' when I try to add the entry.
My code is:
var controls = []ldap.Control{}
func main() {
conn, err := ldap.DialURL("ldap://localhost:389")
...
} else {
newRequest := ldap.NewAddRequest("cn=tom,ou=users,dc=example,dc=org", controls)
conn.Add(newRequest)
}
}
I'm sure the issue is something to do with the controls I'm passing in (or lack thereof), but I'm pretty new to LDAP and relatively new to Go, so I'm not sure what I'm doing wrong. Is there some more detailed documentation anywhere I could read, or is there anything obvious I'm not getting right?
Thank you, and apologies if this isn't the right place to ask this.
The text was updated successfully, but these errors were encountered: