[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: ldapsearch output



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tobias Rice wrote:
| Thank all for your suggestions!
| This works great!
|
| function getUidNum($user)
| {
| ~        $command = "ldapsearch -x -LLL \"(uid=$user)\" uidNumber \
| ~        | awk '($1==\"uidNumber:\") { print $2 }'";
| ~        $ldapString = trim(`$command`);
| ~        return $ldapString;
| }
|

Well, if I knew you were scripting in perl I would have suggested using
Net::LDAP instead ...

Regards,
Buchan

- --
Buchan Milne                      Senior Support Technician
Obsidian Systems                  http://www.obsidian.co.za
B.Eng                                RHCE (803004789010797)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAtGHkrJK6UGDSBKcRAqdDAJ4kIc3P94jtBHzWYaNrYWRGW/pLhACghuU+
64Pl89YGKVnyPK6voC1u5Ds=
=c4Sg
-----END PGP SIGNATURE-----