0

I'm trying to find out if a Linux server can ask a Windows machine for information about it's local users and groups. LDAP is out (from what I've read) because LDAP only works against ActiveDirectory groups, but not against local groups on a specific Windows machine.

I know how to write code to have a Windows machine get the groups from another Windows machine. I'm trying to avoid having to set up a Windows machine with a web service so that my Linux server can call it and get the information their the Windows server (which is just acting as a proxy).

1

You could use WMI (Windows take on SNMP and it's quite good really). There is a linux version of the wmic command line utility in Windows: http://manpages.ubuntu.com/manpages/jaunty/en/man1/wmic.1.html

You could do something liek this to enumerate the users on $SERVER:

wmic -U $DOMAIN/$USER%$PASSWORD //$SERVER “Select * from Win32_UserAccount”

Other things you may want to query are Win32_Group and Win32_GroupUser. Google "win32 wmi classes" for more.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.