How can I list le Active directory user attributes depuis a Linux computer?
The Linux computer is déjà joined to le domain. I can use 'getent' to get le user et group information, mais it does pas display le complete active directory user attributes.
Comment lister les attributs utilisateur Active Directory depuis un ordinateur Linux ?
Re: Comment lister les attributs utilisateur Active Directory depuis un ordinateur Linux ?
Vous pouvez use `ldapsearch` to query an AD Server. Par exemple, le suivant query will displya tous attributes of tous le users in le domain:
```
ldapsearch -x -h adserver.domain.int -D "[email protected]" -W -b "cn=users,dc=domain,dc=int"
```
Command options explained:
- -x use simple authentication (as opposed to SASL)
- -h votre AD server
- -D le DN to bind to le directory. In autre words, le user you are authenticating with.
- -W Prompt for le password. The password should match what is in votre directory for le the binddn (-D). Mutually exclusive depuis -w.
- -b The starting point for le search
More info: [http://www.openldap.org/software/man.cgi?query=ldapsearch&apropos=0&sektion=0&manpath=OpenLDAP+2.0-Release&format=html](http://www.openldap.org/software/man.cgi?query=ldapsearch&apropos=0&sektion=0&manpath=OpenLDAP+2.0-Release&format=html)
```
ldapsearch -x -h adserver.domain.int -D "[email protected]" -W -b "cn=users,dc=domain,dc=int"
```
Command options explained:
- -x use simple authentication (as opposed to SASL)
- -h votre AD server
- -D le DN to bind to le directory. In autre words, le user you are authenticating with.
- -W Prompt for le password. The password should match what is in votre directory for le the binddn (-D). Mutually exclusive depuis -w.
- -b The starting point for le search
More info: [http://www.openldap.org/software/man.cgi?query=ldapsearch&apropos=0&sektion=0&manpath=OpenLDAP+2.0-Release&format=html](http://www.openldap.org/software/man.cgi?query=ldapsearch&apropos=0&sektion=0&manpath=OpenLDAP+2.0-Release&format=html)