Upgrade to UCS 5 - schema issues with previous installed asterisk4ucs

After Upgrade from UCS 4 latest version to UCS 5 following problems exist:

  • Some users does not have access to samba shares
  • These users are in LDAP but not listet by “getent passwd”
  • These users cannot be modified, instead an error message occures: Object class violation: unrecognized objectClass ‘ast4ucsUser’
  • System diagnostics: Following problems are listed: The following LDAP schema definitions are missing:
    The schema definition for attribute [] is missing.
    The schema definition for attribute [] is missing.
    The schema definition for attribute [‘UNKNOWN’, ‘“AST4UCSSERVERMAILBOXEMAILCOMMAND”’] is missing.
    The schema definition for attribute [‘UNKNOWN’, ‘“AST4UCSSERVERMAILBOXEMAILSUBJECT”’] is missing.
    The schema definition for attribute [‘UNKNOWN’, ‘“AST4UCSSERVERSSHUSER”’] is missing.
    The schema definition for attribute [‘UNKNOWN’, ‘“AST4UCSSERVERSSHPATH”’] is missing.
    The schema definition for attribute [‘UNKNOWN’, ‘“AST4UCSSERVERMAILBOXATTACH”’] is missing.
    The schema definition for attribute [‘UNKNOWN’, ‘“AST4UCSSERVERSSHAGIPATH”’] is missing.
    The schema definition for attribute [‘UNKNOWN’, ‘“AST4UCSSERVERSSHHOST”’] is missing.
    The schema definition for attribute [‘UNKNOWN’, ‘“AST4UCSSERVERMAILBOXEMAILBODY”’] is missing.
    The schema definition for attribute [‘UNKNOWN’, ‘“AST4UCSSERVERMAILBOXMAXLEN”’] is missing.
    The schema definition for attribute [‘UNKNOWN’, ‘“AST4UCSSERVERMAILBOXEMAILDATEFORMAT”’] is missing.
    The schema definition for attribute [‘UNKNOWN’, ‘“AST4UCSSERVERSSHMOHPATH”’] is missing.
    The schema definition for attribute [‘UNKNOWN’, ‘“AST4UCSSERVERSSHCMD”’] is missing.
    The schema definition for attribute [‘UNKNOWN’, ‘“AST4UCSMUSICMUSIC”’] is missing.
    The schema definition for attribute [‘UNKNOWN’, ‘“AST4UCSSRVCHILDSERVER”’] is missing.
    The schema definition for attribute [‘UNKNOWN’, ‘“AST4UCSAGISCRIPTCONTENT”’] is missing.
    The schema definition for attribute [‘UNKNOWN’, ‘“AST4UCSAGISCRIPTPRIORITY”’] is missing.
    The schema definition for attribute [‘UNKNOWN’, ‘“AST4UCSUSERRINGDELAY”’] is missing.
    The schema definition for attribute [‘UNKNOWN’, ‘“AST4UCSUSEREXTMODE”’] is missing.
    The schema definition for attribute [‘UNKNOWN’, ‘“AST4UCSUSERTIMEOUT”’] is missing.

How can this be fixed?

Ok., got it fixed

Here are my steps:

mkdir ldap-backup
mkdir ldap-db-backup
cd ldap-backup
service slapd stop
slapcat > backup.ldif
sed -i “/AST4UCS/d” backup.ldif
sed -i “/ast4ucs/d” backup.ldif

after that I checked the file and removed manually three additional asterisk dn blocks

mv /var/lib/univention-ldap/ldap/ …/ldap-db-backup/*
ucr commit /var/lib/univention-ldap/ldap/DB_CONFIG
slapadd <backup.ldif
service slapd start

After that all users are available with getent passwd

Mastodon