How-to: UCS@school import tool to reset counters of unique names from schema

How to:

Reset the schema_counters for unique names in UCS@school.

Step 1: Check the user with unique names

univention-ldapsearch -b cn=unique-usernames,cn=ucsschool,cn=univention,$(ucr get ldap/base)

Step 2: Reset the counter

/usr/share/ucs-school-import/scripts/reset_schema_counter
usage: reset_schema_counter [-h] [-e] [-u] [-p PATTERN] [-w]

UCS@school import tool to reset counters of unique names from schema.

optional arguments:
  -h, --help            show this help message and exit
  -e, --email           Purge unique email address counters [default: False].
  -u, --username        Purge unique username counters [default: False].
  -p PATTERN, --pattern PATTERN
                        Pattern for LDAP filter to lookup which counters to
                        purge [default: *].
  -w, --write           Modify the LDAP. Default is False: make a dry-run.

For example:

/usr/share/ucs-school-import/scripts/reset_schema_counter -u -p <username> -w
Mastodon