Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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:

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

Your Answer


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.