Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Access to Active Directory (Read 8779 times)
Tony Nilsson
YaBB Newbies
*




Posts: 9
Access to Active Directory
05.12.05 at 14:18:50
 
Hi Gerrit-Jan,
 
I think I remeber correct when I think back.  
A while ago you sent me a letter where you told me that you found a way to
get information from AD. This is highly interesting now in our company.
 
We want to know what rights a client have in the AD.  
 
The first I want to know is what catalogs a user have righs to.
 
It whould be nice if you have some SQL-statmens and how to connect information.
 
Best Regards
Tony
 
Back to top
 
 
  IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Re: Access to Active Directory
Reply #1 - 09.12.05 at 16:53:23
 
Hi,
 
I investigated it and I can connect and query. However it does all not make very much sense to me yet. I have to investigate a little further to make it useful to connect to AD.
 
To connect to AD choose the Provider for Directory Services.
Once connected run the following command:
select * from 'LDAP://<<your domain name here>>'
 
Let me know if you find out any more.
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Re: Access to Active Directory
Reply #2 - 09.12.05 at 17:39:47
 
I ran the following queries successfully. I picked them up from newsgroups and the web... There doesn΄t seem to be any good column description anywhere. If I do a select * I only get the ADsPath.
 
select * from 'LDAP://linker.nl'  
  This returns about 120 rows and one column
 
select * from 'LDAP://linker.nl' where objectClass = 'User'
  This seems to return a row for each user defined. I get about 5 rows and one column
 
select  title, displayName, sAMAccountName, givenName  
, telephoneNumber , facsimileTelephoneNumber, sn, mail , department,  
physicalDeliveryOfficeName    
from 'LDAP://linker.nl' where objectClass = 'User'
 
   This returns again five rows but now I get additional columns as requested.
 
It seems we need to understand the where clauses and the column names that are available. It must be written up somewhere...
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Re: Access to Active Directory
Reply #3 - 12.12.05 at 16:51:34
 
I got a little further in understanding Active Directory or LDAP.
 
The thing I realised today is that there is no fixed schema for LDAP. Administrators can create objects and attributes as they please. I have yet to find out how to retrieve the attributes that do exist. What I managed to find out is how to figure out the object tree.
 
When I do a select * from 'LDAP://DC=linker,DC=nl' I get all the objects that are defined in my Active Directory. You read this from right to left. It will list everything it can see under .nl and then within that everything under linker.nl. I have created my domain linker.nl.
 
One of the entries returned is: LDAP://CN=Users,DC=linker,DC=nl
This is two layers down. So withing linker.nl there is an object called builtin that has an object called Users.
 
I can now query select * from 'LDAP://CN=Users,DC=linker,DC=nl' to give a list of all users:
 
 
This is how far I got finding out the attribute names:
http://www.computerperformance.co.uk/Logon/LDAP_attributes_active_directory.htm# Hall_of_fame_LDAP_attribute_-_DN__distinguished_name_
 
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Re: Access to Active Directory
Reply #4 - 13.12.05 at 14:07:49
 
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Re: Access to Active Directory
Reply #5 - 14.12.05 at 09:17:31
 
Tony,
 
I have finished work on the Active Directory. I have put the following documentation together:
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1