WinNT:// style machine connection

29 views
Skip to first unread message

Steve V

unread,
Sep 26, 2011, 11:34:29 PM9/26/11
to Ruby LDAP
Please forgive me if this is a novice question, as I'm fairly new to
LDAP. I'm porting over some code from a .net project which connects to
the primary AD server, retrieves all network servers, and then uses a
connection like this: WinNT://server.domain.com,Computer to retrieves
the members of the "administrator" group. I'm assuming this is it
connecting to the actual server listed, and not some obscured way of
talking to the main AD server.

My question is, can I replicate this functionality with net-ldap, or
ruby-ldap? To possibly further complicate matters, the new application
is running on Linux.

Thanks,
Steve

R. O'Connell

unread,
Sep 27, 2011, 11:52:06 AM9/27/11
to ruby...@googlegroups.com
AD is an LDAP server so you can use the LDAP libraries to query 'what objects are of type Computer in this OU'? What you are doing is talking to the AD server to get a list, but then using a completely different Microsoft proprietary protocol WMI to enumerate that computer list to query the system directly for local Administrator accounts. There is a different library, ruby-wmi, that may help you, but I don't know if it will work in a non-windows system.

Steve V

unread,
Sep 27, 2011, 5:05:23 PM9/27/11
to Ruby LDAP
Thanks, I have come to find out that the method I was using to connect
is termed ADSI, and seems to be pretty much impossible to talk to
windows machines from linux using it. It looks like I'm going to end
up using something called powershell inside to ssh into a windows
machine, and then use that to pull the information from the other
windows servers. Not really what I wanted, but I couldn't find a
better way.
Reply all
Reply to author
Forward
0 new messages