[Samba] Get last uidNumber

basti mailinglist at unix-solution.de
Tue Nov 3 16:24:26 UTC 2020


Hello,
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

But there is no guarantee that the last returned numer is the last 
uidNumber in LDAP.

Is there a limit set by samba how many lines are returned by a query?
Is there a attribute where the last number is stored?

Best Regards



More information about the samba mailing list