diff options
author | Petr Viktorin <pviktori@redhat.com> | 2014-07-15 13:31:01 +0200 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2014-09-23 12:29:37 +0200 |
commit | 5dfa1116c27e72d5b501daab89d05a20028ce507 (patch) | |
tree | 547966bf022a087d53a00139b7fcf899369ba5e0 /install/tools | |
parent | 846123cfc2768d15cee72fa5fe740d82bb99e8ef (diff) | |
download | freeipa-5dfa1116c27e72d5b501daab89d05a20028ce507.tar.gz freeipa-5dfa1116c27e72d5b501daab89d05a20028ce507.tar.xz freeipa-5dfa1116c27e72d5b501daab89d05a20028ce507.zip |
ipaserver.install: Consolidate system user creation
Sytem users and their groups are always created together.
Also, users & groups should never be removed once they exist
on the system (see comit a5a55ce).
Use a single function for generic user creation, and specific
funtions in dsinstance and cainstance.
Remove code left over from when we used to delete the DS user.
Preparation for: https://fedorahosted.org/freeipa/ticket/3866
Reviewed-By: Tomas Babej <tbabej@redhat.com>
Diffstat (limited to 'install/tools')
-rwxr-xr-x | install/tools/ipa-replica-install | 5 | ||||
-rwxr-xr-x | install/tools/ipa-server-install | 7 |
2 files changed, 6 insertions, 6 deletions
diff --git a/install/tools/ipa-replica-install b/install/tools/ipa-replica-install index e3b65b096..2986685d0 100755 --- a/install/tools/ipa-replica-install +++ b/install/tools/ipa-replica-install @@ -568,9 +568,8 @@ def main(): api.bootstrap(in_server=True, context='installer') api.finalize() - # Create DS group if it doesn't exist yet - group_exists = dsinstance.create_ds_group() - sstore.backup_state("install", "group_exists", group_exists) + # Create DS user/group if it doesn't exist yet + dsinstance.create_ds_user() #Automatically disable pkinit w/ dogtag until that is supported options.setup_pkinit = False diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install index c81914951..86422e332 100755 --- a/install/tools/ipa-server-install +++ b/install/tools/ipa-server-install @@ -556,7 +556,8 @@ def uninstall(): ipaclient.ntpconf.restore_forced_ntpd(sstore) - group_exists = sstore.restore_state("install", "group_exists") + # Clean up group_exists (unused since IPA 2.2, not being set since 4.1) + sstore.restore_state("install", "group_exists") services.knownservices.ipa.disable() @@ -1061,8 +1062,8 @@ def main(): # configure /etc/sysconfig/network to contain the custom hostname tasks.backup_and_replace_hostname(fstore, sstore, host_name) - # Create DS group if it doesn't exist yet - dsinstance.create_ds_group() + # Create DS user/group if it doesn't exist yet + dsinstance.create_ds_user() # Create a directory server instance if external != 2: |