LDAP Backend DN Question

Moderator: crythias

Post Reply
sgadow
Znuny newbie
Posts: 10
Joined: 07 Mar 2011, 22:25
Znuny Version: 3.0.6

LDAP Backend DN Question

Post by sgadow »

I seem to be missing some users and I cannot figure out why or where they are missing from so if someone could help me with my settings it would be awesome

Currently my AD is structured as follows (I am eventually going to restructure-redesign the ad but for now this is what i have to work with) there are many OUs down the the lowest level listed (I did not list every sub ou as there are a lot)

Code: Select all

ocusd.local
    --- Domain Users  (users here)
          --   Staff
                -- BHC (Users here)
                         - coaches   (users here)
                         - teachers  (users here)
                --OHS  (Users here)
                        - teachers  (users here)
                        - Caf    (users here)
                        - Lib   (users here)
         --  Students 
                --OHS  (Users here)
                        - 9  (users here)
                        - 10    (users here)
                        - 11  (users here)
   --- Users  (Users here & OTRS User is here)
This is my current code what did i do wrong?

Code: Select all

	  $Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
	  $Self->{'AuthModule::LDAP::Host'} = 'ODDC-N1.ocusd.local'; 
      $Self->{'AuthModule::LDAP::BaseDN'} = 'dc=ocusd, dc=local';
      $Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
	  
	  $Self->{'AuthModule::LDAP::SearchUserDN'} = 'cn=Helpdesk User, cn=Users, dc=ocusd, dc=local';
      $Self->{'AuthModule::LDAP::SearchUserPw'} = 'hduserpw';
	  
	  $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
      $Self->{'Customer::AuthModule::LDAP::Host'} = 'ODDC-N1.ocusd.local';
      $Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'ou= Domain Users, dc=ocusd, dc=local';
      $Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';
	  
      $Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'cn=Helpdesk user, cn=Users, dc=ocusd, dc=local';
      $Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'hduserpw';
	    
	  $Self->{CustomerUser} = {
    Module => 'Kernel::System::CustomerUser::LDAP',
    Params => {
      Host => 'ODDC-N1.ocusd.local',
      BaseDN => 'ou= Domain Users, ou= Users, dc=ocusd, dc=local',
      SSCOPE => 'sub',
      UserDN => 'cn=Helpdesk user, ou=Users, dc=ocusd, dc=local',
      UserPw => 'hduserpw',
    },
    CustomerKey => 'sAMAccountName',
    CustomerID => 'mail',
    CustomerUserListFields => ['sAMAccountName', 'cn', 'mail'],
    CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
    CustomerUserPostMasterSearchFields => ['mail'],
    CustomerUserNameFields => ['givenname', 'sn'],
    Map => [
      # note: Login, Email and CustomerID needed!
      # var, frontend, storage, shown, required, storage-type
#       [ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
      [ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
      [ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
      [ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
      [ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
      [ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
      [ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
#       [ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var' ],
      [ 'UserComment', 'Comment', 'description', 1, 0, 'var' ],
    ],
  };
iztok
Znuny newbie
Posts: 83
Joined: 06 Jan 2011, 14:28
Znuny Version: 3

Re: LDAP Backend DN Question

Post by iztok »

Try setting the BaseDN to dc=ocusd,dc=local on each occurence! I see that somewhere you have set Domain users, ocusd, local. Thats probably confusing otrs. Also get rid of spaces between values (e.g. 'dc= ocusd,dc=local') - note the space between = and ocusd

This will show all the users in your AD and solve your issue :-)
sgadow
Znuny newbie
Posts: 10
Joined: 07 Mar 2011, 22:25
Znuny Version: 3.0.6

Re: LDAP Backend DN Question

Post by sgadow »

When I do what you suggested it does not work correctly it only displays groups and not users under the groups so I changed it back to what I had originally.. what i have noticed now however is that these are the ou's that are missing.. I removed all of the spaces however that you suggested which had no affect on the end result

Code: Select all

Domain Users
        -- Staff
                   -- Black Hawk Center (this and subs is included)
                   -- District (This and subs is included)
                   -- David L Rahn Jr High  (this and all subs Not included)
                   -- Jefferson Elementary School (this and all subs not included)
                   -- Etnyre Middle School (this and all subs not included)
                   -- Oregon High School (this and subs is included)
       -- Students (this and subs not included either but I don't desire it to be anyway)

It is really blowing my mind as to what can be going on
Post Reply