[Samba] net ads user info .vs. wbinfo -g ?
presgas at gmail.com
Tue Jun 21 05:25:42 MDT 2011
-----BEGIN PGP SIGNED MESSAGE-----
On 06/20/2011 12:44 PM, John McNulty wrote:
> The group names from these two commands display differently. For example:
> $ net ads user info my-name -U my-name
> Systems Engineering EU
> $ wbinfo -g
> Why is this different?
The "net" command is a close relative to the "net" command for windows.
It will display information in a format more like windows or ldap-like
If you do this type of "net" command on your samba install:
net ads search "(SAMAccountName=adusername)" -P
you will get all the entries from active directory, similar to the
output from ADSIedit. The "-P" allows you to use your samba machine's
credentials (if it is joined to the domain).
net ads search "(&(objectCategory=computer)(name=*rhel*))" -P
Allows ldap-like searching.
"wbinfo" and "winbindd" allow translation from windows account formats
to unix-like account formats. This is why the outputs are different.
If you were to do a "getent passwd aduser" you will get a direct entry
that is as if it was from /etc/passwd. It is actually getting info from
"winbindd" and translating it on the fly.
Hope that helps differentiate them.
GPG Public Key:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
More information about the samba