Bug 995562

Summary: ipa-restore fails to work - 'getpwnam(): name not found: dirsrv'
Product: [Fedora] Fedora Reporter: Bill Peck <bpeck>
Component: freeipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: abokovoy, mkosek, pviktori, rcritten, ssorce, tbabej
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: freeipa-3.3.2-1.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-10 06:56:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
ipa restore log none

Description Bill Peck 2013-08-09 17:46:55 UTC
Created attachment 784938 [details]
ipa restore log

Description of problem:

[root@localhost ~]# ipa-restore ipa-full-2013-08-08-14-53-38
Directory Manager (existing master) password: 

Preparing restore from /var/lib/ipa/backup/ipa-full-2013-08-08-14-53-38 on strider.home.pecknet.com
'getpwnam(): name not found: dirsrv'


Version-Release number of selected component (if applicable):
freeipa-server-3.2.2-1.fc19.i686

How reproducible:
Everytime

Steps to Reproduce:
1. Fresh install of F19
2. copy previous backup to /var/lib/ipa/backup
3. ipa-restore ipa-full-2013-08-08-14-53-38

Actual results:
'getpwnam(): name not found: dirsrv'

Additional info:
A workaround is to do an install then an uninstall.
Then proceed with the restore.

Comment 1 Rob Crittenden 2013-08-09 18:10:38 UTC
The dirsrv user is created during the IPA server install process.

A quicker workaround is to create the user prior to restoration:

/usr/sbin/useradd -g dirsrv -c "DS System User" -d /var/lib/dirsrv -s /sbin/nologin -M -r dirsrv

Comment 2 Bill Peck 2013-08-09 19:04:20 UTC
I've also run into the issue that ipa-backup/ipa-restore blindly copies over /etc/group and /etc/passwd.  Major problem is that groups can get created in different orders on different installs.

In my situation ssh_keys and polkitd group id's are swapped.  

This causes sshd to freak out and prevent me from ssh'ing into the machine.

Is there a better way to restore when doing so on a fresh install?

Comment 3 Martin Kosek 2013-08-12 07:20:35 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/3856

Comment 4 Tomas Babej 2013-08-19 08:47:40 UTC
Upstream ticket for the second Bill's remark:
https://fedorahosted.org/freeipa/ticket/3866

Comment 6 Fedora End Of Life 2013-09-16 16:55:43 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle.
Changing version to '20'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20

Comment 7 Fedora Update System 2013-10-08 11:21:18 UTC
freeipa-3.3.2-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/freeipa-3.3.2-1.fc20

Comment 8 Fedora Update System 2013-10-09 14:27:48 UTC
Package freeipa-3.3.2-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing freeipa-3.3.2-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-18542/freeipa-3.3.2-1.fc20
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2013-11-10 06:56:40 UTC
freeipa-3.3.2-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.