Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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).

share|improve this question
add comment

1 Answer

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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