Provision, validate, and inspect a Samba Active Directory domain controller
Source: target-root/usr/local/libexec/solidgroundux/manage-active-directory-server.sh
Provision, validate, and inspect a Samba Active Directory domain controller
Public functions
Internal functions
| Function | Purpose | Arguments | Output |
|---|---|---|---|
_load_ad_management_library | Locate and source the shared Active Directory management helpers. | — | — |
_adsvr_validate_realm | Check whether an Active Directory realm name satisfies the accepted DNS-style format. | — | — |
_adsvr_collect_context | Collect and validate the realm, NetBIOS, DNS forwarder, host, and server-address provisioning context. | — | — |
_adsvr_load_context | Load Active Directory context from the current Samba configuration. | — | — |
_adsvr_require_context | Ensure Active Directory provisioning context is available. | — | — |
_adsvr_prepare_hosts | Rewrite /etc/hosts so the domain controller short name resolves to its canonical FQDN and IPv4 address. | — | — |
_adsvr_set_dns_forwarder | Set the Samba global dns forwarder value while preserving the rest of smb.conf. | — | — |
_adsvr_wait_configured | Wait for Samba is-configured to report the service ready. | - $1: Optional: maximum seconds to wait. | — |
_adsvr_wait_dns_port_free | Wait until IPv4 TCP and UDP port 53 are free for Samba DNS. | - $1: Optional: maximum seconds to wait. | — |
_adsvr_wait_dns | Wait until Samba owns IPv4 TCP and UDP port 53 on the domain controller. | - $1: Optional: maximum seconds to wait. | — |
_adsvr_step_install_packages | Install and validate Samba AD/DC, Kerberos, and DNS prerequisites. | — | — |
_adsvr_step_preflight | Collect provisioning inputs and reject an already-provisioned or invalid domain-controller state. | — | — |
_adsvr_step_identity | Prepare the domain controller hostname and hosts-file identity. | — | — |
_adsvr_step_provision | Provision the Samba Active Directory domain database and configuration. | — | — |
_adsvr_step_domain_settings | Apply initial Administrator password policy and Samba DNS forwarder settings. | — | — |
_adsvr_step_kerberos | Install and validate the Kerberos configuration generated by Samba. | — | — |
_adsvr_step_resolver | Configure the domain controller resolver to use Samba DNS and prepare port 53 ownership. | — | — |
_adsvr_step_start | Start Samba AD/DC and wait for service and DNS readiness. | — | — |
_adsvr_step_register_dns | Register and verify the domain controller DNS records required for AD discovery. | — | — |
_adsvr_provision_domain | Run the complete tracked Active Directory server provisioning sequence. | — | — |
_adsvr_join_preflight | Reject an existing local DC or Samba configuration, resolve the remote DC, | — | — |
_adsvr_join_domain | Use Samba's domain join DC path, not domain provision. Credentials are | — | — |
_adsvr_join_replication | Check DRS replication status and domain health without forcing replication. | — | — |
_adsvr_join_additional | Track additional DC provisioning in one process. | — | — |
_adsvr_validate | Run active validation checks for the Samba AD/DC service, DNS, directory, and Kerberos discovery. | — | — |
_adsvr_status | Display the configured Samba server role, realm, workgroup, DNS forwarder, and service state. | — | — |
_adsvr_action_is_mutating | Identify AD Server actions that modify host or domain state. | — | — |
_adsvr_run_action | Dispatch the selected Active Directory Server action to its standalone manager. | - $1: Management action to execute. | — |
Description
Implements persistent Active Directory server management actions exposed by the 20-active-directory-server Management Console module.
Usage
Run the executable from its shell command (or installed wrapper):
manage-active-directory-server --action status
manage-active-directory-server --action validate
manage-active-directory-server --dryrun --action provision-all
Script-specific options:
--action NAME,-a: Management action (supported actions:provision-all,join-additional,join-preflight,join-domain,join-replication,install,preflight,identity,provision,settings,kerberos,resolver,start,dns,validate,status).
