This bug is created as a clone of upstream ticket:
When we run ipa-server-install --uninstall we remove the user we create to run 389-ds as, dirsrv.
The problem is if you install IPA, uninstall it, then create a new system user that user will get the old dirsrv uid and file permissions will be such that trying to re-install IPA will fail with:
CRITICAL failed to restart ds instance Command '/usr/sbin/setup-ds.pl --silent --logfile - -f /tmp/tmpSm39vT' returned non-zero exit status 1
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
Cause: IPA server uninstall process removed system users that were added as a part of IPA installation. This included dirsrv or pkiuser users which are Directory Server use to run its instances. These users also own log files produced by Directory Server.
Consequence: If IPA server was being installed again and the newly added system users UID changed, the Directory Server may fail to start because the Directory Server instance is not permitted to write to the log files owned by the old system user with a different UID.
Fix: System users generated by IPA server installation are no longer removed in uninstall.
Result: System users UID does not change and new Directory Server configured by the new IPA server installation process is able to write to its log files.
# ipa-server-install --uninstall
This is a NON REVERSIBLE operation and will delete all data and configuration!
Are you sure you want to continue with the uninstall procedure? [no]: yes
Shutting down all IPA services
Removing IPA client configuration
Unconfiguring CA directory server
Unconfiguring web server
Unconfiguring directory server
# cat /etc/passwd | grep dirsrv
pkisrv:x:496:496:PKI DS System User:/var/lib/dirsrv:/sbin/nologin
dirsrv:x:494:496:DS System User:/var/lib/dirsrv:/sbin/nologin
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.