** This solution is not supported by NethServer **

Once you install Samba Active Directory, there is a way to delete it but it’s convoluted. By uninstalling Samba Active Directory in the Installed tabs on the Software Center doesn’t completely uninstall it.

First do a Factory Reset of the AD.  This is intended when adding AD fails, but you can also run it even it’s okay.  Do this steps either on the server console or with a ssh logon.

[root@server ~]# realm leave
[root@server ~]#
[root@server ~]# systemctl stop nsdc sssd
[root@server ~]#
[root@server ~]# rm -vf /var/lib/machines/nsdc/etc/samba/smb.conf
removed ‘/var/lib/machines/nsdc/etc/samba/smb.conf’
[root@server ~]#
[root@server ~]# find /var/lib/machines/nsdc/var/lib/samba/ -type f | xargs -- rm -vf
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/krb5.conf’
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/dns_update_list’
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/spn_update_list’
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/secrets.keytab’
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/named.conf.update’
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/dns_update_cache’
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/tls/cert.pem’
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/tls/ca.pem’
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/tls/key.pem’
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/sam.ldb.d/metadata.tdb’
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/sam.ldb.d/DC=BALES,DC=LAN.ldb’
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/sam.ldb.d/CN=CONFIGURATION,DC=BALES,DC=LAN.ldb’
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/sam.ldb.d/CN=SCHEMA,CN=CONFIGURATION,DC=BALES,DC=LAN.ldb’
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/sam.ldb.d/DC=DOMAINDNSZONES,DC=BALES,DC=LAN.ldb’
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/sam.ldb.d/DC=FORESTDNSZONES,DC=BALES,DC=LAN.ldb’
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/share.ldb’
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/secrets.ldb’
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/secrets.tdb’
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/hklm.ldb’
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/privilege.ldb’
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/idmap.ldb’
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/sam.ldb’
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/schannel_store.tdb’
removed ‘/var/lib/machines/nsdc/var/lib/samba/private/netlogon_creds_cli.tdb’
removed ‘/var/lib/machines/nsdc/var/lib/samba/sysvol/bales.lan/Policies/{31B2F340-016D-11D2-945F-00C04FB984F9}/GPT.INI’
removed ‘/var/lib/machines/nsdc/var/lib/samba/sysvol/bales.lan/Policies/{6AC1786C-016F-11D2-945F-00C04FB984F9}/GPT.INI’
removed ‘/var/lib/machines/nsdc/var/lib/samba/registry.tdb’
removed ‘/var/lib/machines/nsdc/var/lib/samba/share_info.tdb’
removed ‘/var/lib/machines/nsdc/var/lib/samba/account_policy.tdb’
removed ‘/var/lib/machines/nsdc/var/lib/samba/winbindd_cache.tdb’
[root@server ~]#
[root@server ~]# config setprop sssd Provider none status disabled
[root@server ~]#
[root@server ~]# > /etc/sssd/sssd.conf
[root@server ~]#

Reboot.

After it’s rebooted the website will ask to assign an IP address of the AD, but don’t start it again. Instead Remove the Samba Active Directory in the Software Center in the Installed tab and this time the AD is gone.

Installed Samba Active Directory
Installed Samba Active Directory
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s