Bug 797566

Summary: Don't remove dirsrv user on uninstall
Product: Red Hat Enterprise Linux 6 Reporter: Dmitri Pal <dpal>
Component: ipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3CC: jgalipea, mkosek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-2.2.0-3.el6 Doc Type: Bug Fix
Doc Text:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 13:19:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dmitri Pal 2012-02-26 18:08:51 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/freeipa/ticket/2423

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

Comment 3 Martin Kosek 2012-04-24 13:01:33 UTC
    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.
    
    New Contents:
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.

Comment 4 Jenny Severance 2012-05-07 13:41:30 UTC
verified ::

# 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 ntpd
Unconfiguring CA directory server
Unconfiguring CA
Unconfiguring named
Unconfiguring web server
Unconfiguring krb5kdc
Unconfiguring kadmin
Unconfiguring directory server
Unconfiguring ipa_memcached

# 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

version ::

ipa-server-2.2.0-12.el6.i686

Comment 7 errata-xmlrpc 2012-06-20 13:19:44 UTC
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.

http://rhn.redhat.com/errata/RHBA-2012-0819.html