Followers

Monday, 1 May 2017

Ruby: Adauth query not returning all users from LDAP server

Source: stackoverflow.com --- Monday, May 01, 2017
I have an LDAP server, and a base name of the form cn=users, dc=foobar, dc=com . I am trying to fetch user data from it using Ruby adauth. When I connect to it using LDAP Admin (a Windows client) I can see ~5000 users matching the base name. But when I use the following Ruby code involving adauth, I only get around 1100 users. How do I fix this? require 'adauth' Adauth.configure do |c| c.domain = 'foobar.com' c.port = 389 c.base = 'CN=users, DC=foobar, DC=com' c.server = '120.203.11.71' c.query_user = 'ldapuser' c.query_password = 'secret' end ad = Adauth.authenticate('kumarm', '$Dogreat12') Adauth.add_field(Adauth::AdObjects::User, :default_email, :userPrincipalName) Adauth.add_field(Adauth::AdObjects::User, :group_id, :primaryGroupID) Adauth.add_field(Adauth::AdObjects::User, :sid, :objectSID) Adauth.add_field(Adauth::AdObjects::Group, :sid, :objectSID # g = Adauth::AdObjects::Group.all u = Adauth::AdObjects::User.all # Gives only about 1100 entries of 4998 Additional detail: LDAP Admin client is able to connect to this LDAP server using GSS-API with SASL option. I don't need to provide any certificates for this to work. ...



from Windows http://ift.tt/2quL0fl

No comments:

Post a Comment