Connecting a SoftNAS Instance/VM to Active Directory from CLI
Purpose
This article provides step by step instructions for joining your SoftNAS instance to Active Directory from within a CLI.
If an HA pairing, this process MUST be run twice, once on each node, or failover would break domain trusts.
Symptoms
For those who prefer to let their keyboards do the work, rather than their mouse, or are running into problems joining AD via the SoftNAS GUI, ('Ajax Timeout' errors have been known to occur), it is possible to join your SoftNAS instance/VM to Active Directory via your command line interface.
Resolution
Once connected, run the following commands to stop Samba and Winbindd services:
These services MUST be stopped to prevent changes from being overwritten.
Once services have been stopped, add a new Kerberos ticket-granting ticket using the following command:
Confirm the Active Directory information by running the following command:
Join your instance to Active Directory using the following command:
The username in question must have rights to create objects in Active Directory and join objects to the domain. IF the above command fails, try the following command:
Once your instance has successfully joined Active Directory, start the Samba and Winbindd services using the following commands:
Various connections will need to be listed at least once so that the GUI can read them later. Issue the following commands:
# To see trust: wbinfo -t # To see all trust domains: wbinfo -m # To sync users: wbinfo -u # To sync group OS: wbinfo -g
Remember to join both nodes of an HA cluster to Active Directory if they are to work in unison.
Check the Samba.conf file for any information pertaining to the Active Directory join process.