Checking if Samba is running as an AD DC
rpenny at samba.org
Fri May 29 06:44:18 UTC 2020
On 29/05/2020 07:33, Andrew Bartlett via samba-technical wrote:
> On Fri, 2020-05-29 at 09:24 +0300, Alexander Bokovoy via samba-
> technical wrote:
>> 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
>>> 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.
> G'Day hezekia,
> Welcome to the design session for your first bike shed! ;-)
> Try (eg):
> testparm st/ad_dc/etc/smb.conf -s| grep "Server Role"
> Andrew Bartlett
Hang on, Hezekia said 'How else should I check that Samba is running as
an AD DC apart from looking at the smb.conf file?'
Using testparm is looking at the smb.conf and doesn't actually mean that
Samba is running.
More information about the samba-technical