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 committed Sep 24, 2024
1 parent 490f8b0 commit a8b8a61
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions sssd_test_framework/utils/sssd.py
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,22 @@ def autofs(self) -> None:
self.sssd.authselect.select("sssd")
self.sssd.enable_responder("autofs")

def mkhomedir(self, homedir: str | None = "/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
"""

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 a8b8a61

Please sign in to comment.