Q&A: What Is The Maximum COUNTER A User Can Get Through Import?


When using the Importer to create users , what is the maximum number a counter can get for importing users?
i.e. user2, user3, …


There is no real limit on this variable. The length of the counter depends on the local environment. You can get the maximum value by:

root@master:~# python
Python 2.7.13 (default, Sep 26 2018, 18:42:22) 
[GCC 6.3.0 20170516] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.maxint
>>> quit()

But there is a limitation on username: 999 .
While the number can become bigger, the algorithm limiting the length of usernames will stop working properly, as only 3 characters have been reserved for counter digits: https://github.com/univention/ucs-school/blob/4.4/ucs-school-import/modules/ucsschool/importer/utils/username_handler.py#L342

If maximum username length is not an issue, there is no problem with numbers above 999 though.
But keep in mind the length of student names is limited to 15 characters and has to start with a letter.