Checking if Samba is running as an AD DC
abartlet at samba.org
Fri May 29 06:33:50 UTC 2020
On Fri, 2020-05-29 at 09:24 +0300, Alexander Bokovoy via samba-
> On to, 28 touko 2020, hezekiah maina via samba-technical wrote:
> > Hello everyone,
> > How else should I check that Samba is running as an AD DC apart
> > from
> > looking at the smb.conf file?
> > Is there a process that gives me this kind of information?
> For Cockpit integration you need to use systemd services to check
> whether a service is configured and enabled/started since that
> environment will anyway have systemd configured.
> systemctl is-enabled samba
> systemctl is-active samba
> For the config file checks, you can use 'testparm' utility:
> $ testparm --show-all-parameters -s|grep 'server role'
> server role=P_ENUM,auto|standalone server|standalone|member
> server|member|classic primary domain controller|classic backup domain
> controller|active directory domain controller|domain controller|dc,
> On non-DC system:
> $ testparm --section-name global --parameter-name 'server role' -s
> Checking configuration is needed anyway because you get information
> about the actual server role, not just that a service is running.
Welcome to the design session for your first bike shed! ;-)
testparm st/ad_dc/etc/smb.conf -s| grep "Server Role"
Andrew Bartlett https://samba.org/~abartlet/
Authentication Developer, Samba Team https://samba.org
Samba Developer, Catalyst IT
More information about the samba-technical