diff --git a/sssd_test_framework/utils/sssd.py b/sssd_test_framework/utils/sssd.py index 9646304..1e69fac 100644 --- a/sssd_test_framework/utils/sssd.py +++ b/sssd_test_framework/utils/sssd.py @@ -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 @@ -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 @@ -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 """ @@ -871,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",