[Samba] Get last uidNumber

Ralph Boehme slow at samba.org
Tue Nov 3 17:40:33 UTC 2020


Howdy!

Am 11/3/20 um 5:24 PM schrieb basti via samba:
> is there a way to get the last uidNumber from ldap.
> 
> I can do a ldapsearch like:
> 
> ldapsearch -h samdom.example.com -D "administrator at samdom.example.com"
> -w "changeit"  -b "DC=samdom,DC=example,DC=com" -x -LLL "(uidNumber=*)"
> uidNumber | grep -Po "(?<=uidNumber: )([0-9]{4})" | sort | tail -n1

you could try adding

-E !pr=100

which should use pages search and return all results -- whether it makes
sense or not. :)

-slow

-- 
Ralph Boehme, Samba Team                https://samba.org/
Samba Developer, SerNet GmbH   https://sernet.de/en/samba/
GPG-Fingerprint   FAE2C6088A24252051C559E4AA1E9B7126399E46

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba/attachments/20201103/6e0f85c7/signature.sig>


More information about the samba mailing list