Hello,
In phpLDAPadmin, if you want to start UIDs from a spesific number (ie. 10000 in my case) you can change the posixAccount template file.
- Open the template file "
/var/www/localhost/htdocs/phpldapadmin/templates/creation/posixAccount.xml
" - Find the value "
=php.GetNextNumber(/;uidNumber)
" and change it to "=php.GetNextNumber(/;uidNumber;;;;10000)
".
To update the cache you may need to restart httpd (but in most cases, you don't have to). The deal is, the function in TemplateRender.php
starts looking for the UID
's beginning from 10000
. It's just like modifying the UID_MIN
value to 10000
in pam.d
(I guess).
The detailed explanation is here;
/var/www/localhost/htdocs/phpldapadmin/lib/TemplateRender.php
My changes on the file is here as follows (.bak file is original).
[15:07:09] root@ldap /var/www/localhost/htdocs/phpldapadmin/templates/creation $ diff posixAccount.xml posixAccount.xml.bak
43c43
< =autoFill(homeDirectory;/home/%uid%)
---
> =autoFill(homeDirectory;/home/users/%uid%)
60c60
< =php.GetNextNumber(/;uidNumber;;;;10000)
---
> =php.GetNextNumber(/;uidNumber)
75c75
< /bin/bash
---
> /bin/sh
[15:07:23] root@ldap /var/www/localhost/htdocs/phpldapadmin/templates/creation $
Hope that helps.