Subject: [Samba] Query a Windows 2003 AD server for specific

David Disseldorp ddiss at sgi.com
Thu Nov 29 02:57:17 GMT 2007


On Wed, 28 Nov 2007 16:57:31 +0100
"Schreiber, Martin" <martin.a.schreiber at siemens.com> wrote:

> The Question:  What command do I use to query a Windows 2003 AD server
> to return the Organizational Unit of a specific users? 

# net ads search 'objectCategory=organizationalunit' name -U user%pass
lists each OU, not sure how you get users within each though.

> Also, what would
> be the command that would return the "Home Directory" path as specified
> in the Account Properties of the Windows 2003 account?

# net ads search '(objectCategory=user)' name sAMAccountName HomeDirectory -U user%pass

Cheers, Dave


More information about the samba mailing list