mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Create DS user and group during ipa-restore
ipa-restore would fail if DS user did not exist. Check for presence of DS user and group and create them if needed. https://fedorahosted.org/freeipa/ticket/3856
This commit is contained in:
committed by
Petr Viktorin
parent
f40cb4c031
commit
de7b1f86dc
@@ -971,16 +971,7 @@ def main():
|
||||
ipaservices.backup_and_replace_hostname(fstore, sstore, host_name)
|
||||
|
||||
# Create DS group if it doesn't exist yet
|
||||
try:
|
||||
grp.getgrnam(dsinstance.DS_GROUP)
|
||||
root_logger.debug("ds group %s exists" % dsinstance.DS_GROUP)
|
||||
except KeyError:
|
||||
args = ["/usr/sbin/groupadd", "-r", dsinstance.DS_GROUP]
|
||||
try:
|
||||
ipautil.run(args)
|
||||
root_logger.debug("done adding DS group")
|
||||
except ipautil.CalledProcessError, e:
|
||||
root_logger.critical("failed to add DS group: %s" % e)
|
||||
dsinstance.create_ds_group()
|
||||
|
||||
# Create a directory server instance
|
||||
if external != 2:
|
||||
|
||||
Reference in New Issue
Block a user