ucs_registerLDAPExtension: command not found

I tried to register a custom schema manually like this:

ucs_registerLDAPExtension “$@”
–schema /path/to/appschemaextension.schema

but the command does not exist.

That’s a function of a built-in shell-library, see Univention Developer Reference .

You need to source the shell-lib first:

# UCS 5.0:
. /usr/share/univention-lib/join.sh
ucs_registerLDAPExtension [...]
# UCS 4.4:
. /usr/share/univention-lib/base.sh
ucs_registerLDAPExtension [...]

somehow this doesn’t work. I tried using:

. /usr/share/univention-lib/join.sh
source /usr/share/univention-lib/join.sh
ucs_registerLDAPExtension --schema /root/my.schema

when I register this:
. /usr/share/univention-lib/ldap.sh

it gives me an error:

ERROR: ucs_registerLDAPExtension: Unable to determine Debian package name
ERROR: This function only works in joinscript or postinst context

it works like this:

. /usr/share/univention-lib/join.sh
. /usr/share/univention-lib/ldap.sh
ucs_registerLDAPExtension --packagename "mySchema" --packageversion "1" --schema /root/my.schema

maybe join.sh is not needed