brembold Absent Member.
Absent Member.
831 views

Query eDirectory from a SQL statement


I am trying to select User attributes from a SQL editor using:

Select cn From "LDAP://servername:389/ou=active,ou=users,o=org"

I'm obviously getting errors when trying to execute this, is this even
possible? What would the correct command be?

Thanks.


--
brembold
------------------------------------------------------------------------
brembold's Profile: http://forums.novell.com/member.php?userid=4186
View this thread: http://forums.novell.com/showthread.php?t=449581

Labels (1)
0 Likes
3 Replies
jwilleke Trusted Contributor.
Trusted Contributor.

Re: Query eDirectory from a SQL statement

On 2011-12-14 16:16:01 +0000, brembold said:

> I am trying to select User attributes from a SQL editor using:
>
> Select cn From "LDAP://servername:389/ou=active,ou=users,o=org"
>
> I'm obviously getting errors when trying to execute this, is this even
> possible? What would the correct command be?
>
> Thanks.


Get an LDAP Editor.

I typically recomend:
http://directory.apache.org/studio/

Oh, and you will not be able to do SQL from the LDAP Editior.

--

Thank You for your help!

-jim
Jim Willeke

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Query eDirectory from a SQL statement

Well, ...

there are some add-ons to eDirectory that can be useful for those who
are more familiar with SQL than with LDAP.

Years ago, when we were still young, there was something like an ODBC
interface to NDS:
http://www.novell.com/developer/ndk/odbc_driver_for_edirectory.html

Quote:
"The Novell ODBC Driver for Novell eDirectory Read-Write provides an
Open Database Connectivity (ODBC) driver specifically designed to query
and retrieve eDirectory data ... The ODBC driver allows you to read and
update (insert,update,delete) operations on eDirectory objects"


2006 this kit was accompanied by the "LDAP JDBC Driver"
http://www.novell.com/developer/ndk/ldap_jdbc_driver.html

Quote: "LDAP JDBC Driver is a Java database connectivity driver that
enables Java programs to execute SQL statements to access Novell eDirectory"


These drivers allow interesting stuff like ...

SELECT NDS_Context, SN FROM inetOrgPerson ORDER BY NDS_Context, SN

SELECT OU, ACL_Trustee, ACL_Attribute, ACL_Read, ACL_Write
FROM OrganizationalUnit

SELECT CN, “Last Login Time” FROM UserNDS
WHERE “Last Login Time” < {ts ’1999-06-10 08:00:00.00’}

SELECT O, "Synchronized Up To_Time"
FROM Organization, Partition
WHERE Organization.NDS_FullName=Partition.NDS_FullName

INSERT into UserNDS (Surname, Nds_Name, UID) values (’Duke’, ’Luke’, 😎

UPDATE UserNDS SET Surname = ’Kuke’, UID = UID + 20 WHERE Nds_Name LIKE
’%uke’

DELETE FROM UserNDS WHERE Nds_Name = ’Luke’ OR UID > 7


Support for these interfaces is provided (at least in theory) on the
novell.devsup.ldap forum


Wolfgang



On 14.12.2011 17:59, Jim Willeke wrote:
> On 2011-12-14 16:16:01 +0000, brembold said:
>
>> I am trying to select User attributes from a SQL editor using:
>>
>> Select cn From "LDAP://servername:389/ou=active,ou=users,o=org"
>>
>> I'm obviously getting errors when trying to execute this, is this even
>> possible? What would the correct command be?
>>
>> Thanks.

>
> Get an LDAP Editor.
>
> I typically recomend:
> http://directory.apache.org/studio/
>
> Oh, and you will not be able to do SQL from the LDAP Editior.
>

0 Likes
Highlighted
peterkuo Absent Member.
Absent Member.

Re: Query eDirectory from a SQL statement


That looks like it will do an anonymous bind for the query (if ever),
and you cannot get CN with anonymous binds....


--
peterkuo
------------------------------------------------------------------------
peterkuo's Profile: http://forums.novell.com/member.php?userid=88
View this thread: http://forums.novell.com/showthread.php?t=449581


-- eDirectory Rules! Peter www.DreamLAN.com
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.