Skip to main content

Configure AD Connection

This command allows you to configure the LDAP/AD connection parameters required for Watchman Agent to connect to your Active Directory domain.


✅ Usage

watchman-agent ad configure --ldap-server <URL> --ldap-port <PORT> --ldap-search-base <DC=DOMAIN,DC=COM> [--ldap-group <DC=DOMAIN,DC=COM>] [--username <user>] [--domain <domain_name>]

⚙️ Options

--ldap-server    (Required) LDAP server URL (ldap:// or ldaps://)
--ldap-port (Required) Port used by the LDAP server
--ldap-search-base (Required) LDAP search base (e.g. DC=mycompany,DC=com)
--ldap-group (Optional) Target AD group (e.g. OU=IT,DC=mycompany,DC=com)
--username (Optional) Username (the agent will prompt for the password securely)
--domain (Optional) Domain name (e.g. mycompany.com)

🧠 How it works

Connection parameters are saved using a configuration object (e.g. AdConfig class). If the --username parameter is provided, a secure prompt will request the corresponding password, which will also be saved. After configuration, a confirmation message will indicate that AD settings have been correctly configured.


📌 Exemple

watchman-agent ad configure \
--ldap-server ldaps://192.168.1.100 \
--ldap-port 636 \
--ldap-search-base "DC=mycompany,DC=com" \
--ldap-group "OU=Users,DC=mycompany,DC=com" \
--username admin \
--domain mycompany.com