On Sat, 2007-12-15 at 17:23 +0000, david wrote:
> Hi,
> I am using ldap ( 5.2) server on aix ( 5.3).
> I want to extract all users and there UID/GID using ldapsearch.
> I can do this on a individual basis per user, for instnace on user 'qwerty'  
> using:
> # ldapsearch -h ukaixsv001 -b "cn=aixdata" -D "cn=admin" -w A0Jmm uid
> =qwerty
> 
> uid=qwerty,ou=People,cn=aixdata
> gidnumber=1
> uidnumber=287
> homedirectory=/home/qwerty
> isadministrator=false
> loginshell=/usr/
> ...
> ...
> 
> 
> But how do I do a search that will extract all users UID/GIID in one go ,
----
other than the fact that you just gave the whole world the 'admin'
password...try this...

ldapsearch -h ukaixsv001 -b "cn=aixdata" -D "cn=admin" -w A0Jmm
'(uid=*)'

and if you want to limit output to just those fields...

ldapsearch -h ukaixsv001 -b "cn=aixdata" -D "cn=admin" -w A0Jmm
'(uid=*)' uid \
uidnumber gidnumber

Craig


---
You are currently subscribed to [email protected] as: [EMAIL PROTECTED]
To unsubscribe send email to [EMAIL PROTECTED] with the word UNSUBSCRIBE as the 
SUBJECT of the message.

Reply via email to