Skip to content

Commit

Permalink
sssdutils: adding common mkhomedir configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Lavu authored and pbrezina committed Sep 25, 2024
1 parent 19e7a33 commit 5b5094b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions sssd_test_framework/utils/sssd.py
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,21 @@ def autofs(self) -> None:
self.sssd.authselect.select("sssd")
self.sssd.enable_responder("autofs")

def mkhomedir(self, homedir: str = "/home") -> None:
"""
Configure SSSD with mkhomedir and oddjobd.
:param homedir: Home directory path.
:type homedir: str | None, optional
#. Select authselect sssd profile with 'with-mkhomedir'
#. Start oddjobd.service
#. Backup home directory
"""
self.sssd.authselect.select("sssd", ["with-mkhomedir"])
self.sssd.svc.start("oddjobd.service")
self.sssd.fs.backup(homedir)

def proxy(
self,
proxy: Literal["files", "ldap"] = "files",
Expand Down

0 comments on commit 5b5094b

Please sign in to comment.