dsquery group -name "" | dsget group -members | dsget user dsquery group -name "" | dsget group -members | dsget user dsquery group -name "" | dsget group -members | dsget user , which will give a complete list of group members in Active Directory with all the fields - do not start the RDP session for the sake of such a session. wget http://www.openvas.org/download/wmi/wmi-1.3.14.tar.bz2 tar -xvf wmi-1.3.14.tar.bz2 cd wmi-1.3.14\Samba\source\wineexe\ Then either manually or using patch -p0 -i patchfile apply the changes from https://gist.github.com/raw/843062/5bb87c4fa13688f65ca8b1e54fc42676aee42e5a/fix_winexe_service.diff . sudo make After which you can already do: winexe -U domain/user%password //server 'dsquery group -name ""| dsget group -members | dsget user' or wmic -U domain/user%password //server 'select * from Win32_ComputerSystem' The first winexe command allows you to run any console commands via RPC on a Windows machine, the second allows you to make WMI requests, which in general gives you even more options (here is a reference to WQL, this is a version of SQL for WMI - http://msdn.microsoft. com / en-us / library / windows / desktop / aa394606% 28v = vs.85% 29.aspx ). luit -encoding cp866 winexe -U domain/user%password //server 'cmd' And at the conclusion then we have: Microsoft Windows [Version 6.1.7601] (c)   (Microsoft Corporation), 2009.   . C:\Windows\system32> However, again in my case, luit 1.1 categorically did not want to see charmaps for cp866 and issued a Warning: couldn't find charset data for locale XXXX; using ISO 8859-1 Warning: couldn't find charset data for locale XXXX; using ISO 8859-1 (similar to https://bugs.launchpad.net/ubuntu/+source/x11-utils/+bug/280449 , there is a fix, there is no package). I decided for myself that it is easier to download the source code of a very fresh luit — http://invisible-island.net/luit . Seeing it in x11-utils, where it usually happens, is unlikely to be possible. Further: ./configure Perhaps there will not be any dependencies, everything is solved. I flew all quickly. sudo make Source: https://habr.com/ru/post/181103/
All Articles