Skip to content

Commit

Permalink
sssdutils: adding with-mkhomedir common configuration
Browse files Browse the repository at this point in the history
* fixed some minor docstrings typos
  • Loading branch information
Dan Lavu committed Sep 24, 2024
1 parent 27bfd4c commit 36148ed
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion sssd_test_framework/utils/sssd.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ def async_start(
:param service: Service to start, defaults to 'sssd'
:type service: str, optional
:param service_user: User used to start the service, defaults to 'sssd'
:type service_user: str, optional
:param apply_config: Apply current configuration, defaults to True
:type apply_config: bool, optional
:param check_config: Check configuration for typos, defaults to True
Expand Down Expand Up @@ -160,6 +162,8 @@ def start(
:param service: Service to start, defaults to 'sssd'
:type service: str, optional
:param service_user: User used to start the service, defaults to 'sssd'
:type service_user: str, optional
:param raise_on_error: Raise exception on error, defaults to True
:type raise_on_error: bool, optional
:param apply_config: Apply current configuration, defaults to True
Expand Down Expand Up @@ -448,7 +452,7 @@ def genconf(self, section: str | None = None) -> ProcessResult:
Exec ``sssd --genconf`` or ``sssd --genconf-section=section`` if ``section`` is not ``None``.
:param section: Section that will be refreshed. Defaults to ``None``.
:type path: str | None, optional
:type section: str | None, optional
:return: Result of the ran command.
:rtype: ProcessResult
"""
Expand Down Expand Up @@ -861,6 +865,15 @@ def gssapi(self) -> None:
self.sssd.domain["pam_gssapi_services"] = "sudo, sudo-i"
self.sssd.domain["pam_gssapi_check_upn"] = "False"

def mkhomedir(self) -> None:
"""
Configure SSSD with mkhomedir and oddjobd.
"""

self.sssd.authselect.select("sssd", ["with-mkhomedir"])
self.sssd.svc.start("oddjobd.service")
self.sssd.fs.backup("/home")

def autofs(self) -> None:
"""
Configure SSSD with autofs.
Expand Down

0 comments on commit 36148ed

Please sign in to comment.