Univention Bugzilla – Bug 54759
Join script modify DN without checking the existence
Last modified: 2022-05-17 10:02:20 CEST
A customer (see ticket) had problems to join servers as our join script only tries to modify the DN: cn=domain-admin,cn=category,cn=portals,cn=univention,$ldap_base in line 65 (ff.) without checking if that DN exists. The reason why that DN is not existing is not know, but anyways a test if the DN exists and if not a create instead of modify would be an improvement for our product. Actural code: univention-directory-manager portals/category modify "$@" \ --dn "cn=domain-admin,cn=category,cn=portals,cn=univention,$ldap_base" \ --append entries="cn=server-overview,cn=entry,cn=portals,cn=univention,$ldap_base" || die
It should exists: management/univention-portal/33univention-portal.inst- univention-directory-manager portals/category create "$@" --ignore_exists \ management/univention-portal/33univention-portal.inst- --position "cn=category,cn=portals,cn=univention,$ldap_base" \ management/univention-portal/33univention-portal.inst: --set name=domain-admin \ management/univention-portal/33univention-portal.inst- --append entries="cn=umc-domain,cn=entry,cn=portals,cn=univention,$ldap_base" \ management/univention-portal/33univention-portal.inst- --append displayName='"en_US" "Administration"' \ management/univention-portal/33univention-portal.inst- --append displayName='"de_DE" "Verwaltung"' \ management/univention-portal/33univention-portal.inst- --append displayName='"fr_FR" "Administration"' || die If it doesn't - find out who deleted it. Don't delete it manually. If you want to have custom portals just create a new portal instead of removing contents from the original ones.
But "|| die" is from my point of view not the best way to handle a missing DN and that's what I'm pointing on.