Commit Graph

10 Commits (371305bed4f88bdec320420596513c63a1bcee5e)

Author SHA1 Message Date
Dustin cb92f47b4d roles/samba: Manage LDAP TLS certificates
This commit adds tasks to the *samba-dc* role to install TLS
certificates for the Samba LDAP server, and configures Samba to use
them.
2019-03-22 09:31:19 -05:00
Dustin 93598145b6 roles/samba-dc: Support configuring TLS
In order to enable LDAPS/STARTTLS support in Samba, the `tls enabled`
option must be set to `yes` and the `tls keyfile` and `tls certfile`
options must be set to the path of the private key and certificate
files, respectively, that Samba will use. The `samba_tls_enabled`,
`samba_tls_keyfile`, and `samb_tls_certfile` Ansible variables can be
used to control these values.
2018-05-28 15:24:34 -05:00
Dustin 984628cbbc roles/samba-dc: Fix typo in host principal name
The service principal name added to `/etc/krb5.keytab` had a trailing
`}` character because of a typo in the Ansible task. This resulted in
GSSAPI authentication failing because server processes could not find
the host key in the key table.
2018-04-08 10:50:51 -05:00
Dustin 5a91cb731a samba-dc: Configure samba4 winbind
The *samba-dc* role now configures `winbindd` on domain controllers to
support identity mapping on the local machine. This will allow domain
users to log into the domain controller itself, e.g. via SSH.

The Fedora packaging of *samba4* still has some warts. Specifically, it
does not have a proper SELinux policy, so some work-arounds need to be
put into place in order for confined processes to communicate with
winbind.
2018-03-11 18:16:17 -05:00
Dustin efbb563670 roles/samba-dc: Conditionally configure BIND9_DLZ
This commit adjusts the tasks in the *samba-dc* role to use a
conditional include to restrict tasks relating to the BIND9_DLZ plugin
only to hosts that are configured to use it.
2018-02-19 22:46:27 -06:00
Dustin 03ef6a402a roles/samba: Add some management tools
The *bind-utils* package contains `dig` and `nsupdate`, which are used
to query and manage DNS records.

The *cyrus-sasl-gssapi* package contains the GSSAPI plugin for
SASL-aware applications, including `ldapsearch`.

The *ldb-tools* package contains `ldbsearch` and other tools for
directly using Samba database files.
2018-02-18 13:14:35 -06:00
Dustin f458a46e3f roles/samba-dc: Additional BIND SELinux contexts
The `/var/lib/samba/bind-dns` directory contains files that are
hard-linked to files in the `/var/lib/samba/private` directory. All
paths for a file must have the same context, or `restorecon` will
effectively "toggle" the labels each time it is run.
2018-02-18 13:10:31 -06:00
Dustin 94154a9f2b roles/samba-dc: Correct restorecon path
Evidently, some files in `/var/lib/samba` match multiple file context
rules. Thus, when running `restorecon` against the entire
`/var/lib/samba` directory, files in the `bind-dns` subdirectory may end
up with the wrong label. To work around this issue, `restorecon` is now
run only on that subdirectory to ensure the correct labels are applied.

This is likely to cause problems when a full filesystem relabel is
scheduled.
2018-02-18 10:09:57 -06:00
Dustin cb7c36d65a roles/samba-dc: Support joining existing domain
The *samba-dc* role now supports joining an existing Active Directory
domain as an additional domain controller. The `samba_is_first_dc` variable
controls whether the machine will be provisioned with a new domain (when
true) or added to an existing domain (when false).

Joining an existing domain naturally requires credentials of a user with
permission to add a new DC, the `samba_dc_join_username` and
`samba_dc_join_password` variables can be used to specify them.
Alternatively, if these variables are not defined, then the process will
attempt to use Kerberos credentials. This would require playbooks to
make a ticket-granting-ticket available somehow, such as by executing
`kinit` prior to applying the *samba-dc* role.
2018-01-29 15:11:07 -06:00
Dustin 42ce2434ad roles/samba-dc: Deploy a Samba AD DC
The *samba-dc* role installs Samba on the managed node and configures it
as an Active Directory Domain controller. A custom module,
`samba_domain` handles the provisioning using `samba-tool domain
provision` in an idempotent way.
2018-01-29 15:07:15 -06:00