• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 991
  • Last Modified:

LDAP Connection String Values

Hi All,

We have a new network printer which has ldap functionality, so that users can scan directly into a users mailbox

dc=MyDomainName,dc=com - if i leave the ldap string like this it displays everything in active directory - bascially too much info and too messy

however if i use:

ou=_Finance,dc=MyDomainName,dc=com

its alot cleaner as it only shows me users from the finance org unit

however i am having trouble editing the string to add more organisational units or even if its possible

for example

ou=_Finance, ou=_IT, ou=_warehouse,dc=MyDomainName,dc=com - this does not work

any ideas people ....
0
b-harry
Asked:
b-harry
1 Solution
 
Glen KnightCommented:
You will need to specify each organisational units full string, you cannot tag them on.

As far as your LDAP query is concerned it is looking for this as an OU: ou=_Finance, ou=_IT, ou=_warehouse,dc=MyDomainName,dc=com
So if inside OU _warehouse it's looking for an OU called _IT and then inside IT it's looking for an OU called _finance.
0
 
b-harryAuthor Commented:
i get you thanks, so in my case what do i need to type?

for example:
ou=_Finance,dc=MyDomainName,dc=com + ou=_IT,dc=MyDomainName,dc=com

how do i bind the 2?
whats the syntax?
0
 
b-harryAuthor Commented:
or if i only want to get all the OU and not anything else what do i do here - think this might be better?

Thanks
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
Glen KnightCommented:
You are probably only likely to be able to bind to one OU at a time.
0
 
peakpeakCommented:
I use this to address two OUs below root and can scan to users in both OUs:
OU=com, OU=root, DC=mycompany,DC=mydomail,DC=org
Note that the order is sometimes important, OUs from high to low and DC from low to high
0
 
Chris DentPowerShell DeveloperCommented:

Can you supply it with an LDAP Filter? In many cases a reasonable LDAP Filter can be used to limit the results to a more useful set. For example, if all your users have "Company" filled in, you could use "(&(objectClass=user)(objectCategory=person)(company=*))".

It's very rare to see an option to allow you to bind to more OUs. By that I mean it would be a problem to search this structure from AD Users and Computers:

MyDomainName.com
             | -- _Finance
             | -- _IT
             | -- _Warehouse

To do so requires the system to perform and combine the results of three separate searches. That's a lot more work than the simple LDAP programs tend to like.

It's part of why you see this kind of structure in AD quite frequently:

MyDomainName.com
             | -- Departments
                           | -- _Finance
                           | -- _IT
                           | -- _Warehouse

It gives you the ability to return each of those three departments by setting the search base to "OU=Departments,DC=MyDomainName,DC=com". Easily dropping all of the default users.

Of course, altering your AD structure for one printer might be a bit over the top :)

Chris
0
 
b-harryAuthor Commented:
as it did not directly give a solution to my issue, but it helped me in finding the solution
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now