How-To: Remove a Server

How to remove a server from Univention directory

Environment

You want to decomission one of the UCS servers running in your UCS domain.
Note: A UCS master server can not be decomissioned. Only backup, slave and member roles can be decomissioned.

Step 1

Power off your server to be decommissioned.

Step 2

In the UMC remove the server from LDAP:
image

Step 3

Remove the server from the Samba-AD replication by:

samba-tool domain demote --remove-other-dead-server=<server name>

followed by

samba-tool drs kcc

Step 4

Also remove the server from the ldapserver policy, so that every node and controller knows about the removal:

udm policies/ldapserver modify --dn "cn=default-settings,cn=ldap,cn=policies,dc=dom,dc=ain" --remove "ldapServer=<server-name>"

Step 5 (optional)

If you still see fragments of the server you can use the old build-in script to remove all entries from OpenLDAP directory and Samba/AD. (was needed before samba-tool domain demote was published)

/usr/share/univention-samba4/scripts/purge_s4_computer.py --computername=<server name>

You may receive errors, as normally step 2 should have done this allready.

6 Likes
Mastodon