Bug 437405

Summary: ipa-server-install fails - password not handled correctly
Product: [Fedora] Fedora Reporter: Rich Megginson <rmeggins>
Component: ipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9CC: nkinder, ssorce, tscherf
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-14 16:13:14 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:
Attachments:
Description Flags
rawhide-system: /tmp/ipaserver-install.log
none
f8-system: /tmp/ipaserver-install.log
none
error log from rawhide system
none
error log from rhel5 system
none
ipaserver-install.log
none
errors none

Description Rich Megginson 2008-03-13 21:23:28 UTC
+++ This bug was initially created as a clone of Bug #437342 +++

Description of problem:
I called ipa-server-install with -N option since it is running inside of a xen
box. then the following error happened:

The following operations may take some minutes to complete.
Please wait until the prompt is returned.
Configuring directory server:
  [1/16]: creating directory server user
  [2/16]: creating directory server instance
root        : CRITICAL failed to restart ds instance Command
'/usr/sbin/setup-ds.pl --silent --logfile - -f /tmp/tmpjk-IZC' returned non-zero
exit status 2
  [3/16]: adding default schema
Unexpected error - see ipaserver-install.log for details:
 [Errno 2] No such file or directory:
'/etc/dirsrv/slapd-EXAMPLE-COM//schema/60kerberos.ldif'

all software have been installed using "yum install ipa-server"

Version-Release number of selected component (if applicable):
ipa-server-0.99-11.fc9.i386

How reproducible:
ipa-server-install

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

-- Additional comment from tscherf on 2008-03-13 13:14 EST --
get this when trying to call /usr/sbin/setup-ds.pl manually:

[root@fedora ~]# /usr/sbin/setup-ds.pl
Can't locate Mozilla/LDAP/Conn.pm in @INC (@INC contains: /usr/lib/dirsrv/perl
/usr/lib/perl5/5.10.0/i386-linux-thread-multi /usr/lib/perl5/5.10.0
/usr/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/site_perl/5.8.8
/usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6
/usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.8.8
/usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6
/usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl .) at
/usr/lib/dirsrv/perl/Setup.pm line 62.
BEGIN failed--compilation aborted at /usr/lib/dirsrv/perl/Setup.pm line 62.
Compilation failed in require at /usr/sbin/setup-ds.pl line 44.
BEGIN failed--compilation aborted at /usr/sbin/setup-ds.pl line 44.


-- Additional comment from rcritten on 2008-03-13 13:28 EST --
Try updating perl-Mozilla-LDAP-1.5.2-4.fc9.1

-- Additional comment from tscherf on 2008-03-13 16:00 EST --
that fixed it.

but here is another one after calling ipa-server-install I now got this:

[4/16]: enabling memberof plugin
root        : CRITICAL Failed to load memberof-conf.ldif: Command
'/usr/bin/ldapmodify -h 127.0.0.1 -xv -D cn=Directory Manager -w redhat--- -f
/usr/share/ipa/memberof-conf.ldif' returned non-zero exit status 49
  [5/16]: enabling referential integrity plugin
root        : CRITICAL Failed to load referint-conf.ldif: Command
'/usr/bin/ldapmodify -h 127.0.0.1 -xv -D cn=Directory Manager -w redhat--- -f
/usr/share/ipa/referint-conf.ldif' returned non-zero exit status 49
  [6/16]: enabling distributed numeric assignment plugin
root        : CRITICAL Failed to load dna-conf.ldif: Command
'/usr/bin/ldapmodify -h 127.0.0.1 -xv -D cn=Directory Manager -w redhat--- -f
/usr/share/ipa/dna-conf.ldif' returned non-zero exit status 49
  [7/16]: configuring uniqueness plugin
root        : CRITICAL Failed to load unique-attributes.ldif: Command
'/usr/bin/ldapmodify -h 127.0.0.1 -xv -D cn=Directory Manager -w redhat--- -f
/tmp/tmp1SuSax' returned non-zero exit status 49
  [8/16]: creating indices
root        : CRITICAL Failed to load indices.ldif: Command '/usr/bin/ldapmodify
-h 127.0.0.1 -xv -D cn=Directory Manager -w redhat--- -f
/usr/share/ipa/indices.ldif' returned non-zero exit status 49
  [9/16]: configuring ssl for ds instance
Unexpected error - see ipaserver-install.log for details:
 {'desc': 'Invalid credentials'}



-- Additional comment from tscherf on 2008-03-13 16:24 EST --
using "Directory Manager" as cn instead of Directory Manager shows up "invalid
credentials". looks like the account hasn't been created correctly?


-- Additional comment from tscherf on 2008-03-13 17:14 EST --
the ldapmodify above worked when manually setting the directory manager pw to a
CLEAR pw in dse.ldif. looks like the password is not handled correctly by
ipa-server-install.


The original bug has been closed (fixed by new version of perl-Mozilla-LDAP). 
Opening a new bug for the incorrect password issue.

Comment 1 Thorsten Scherf 2008-03-14 11:37:06 UTC
passing the passwords as an option to ipa-server-install also doesn't help here:

[root@fedora ~]# ipa-server-install -N -p redhat123 -a redhat123

will result in the same error code 49


Comment 2 Rob Crittenden 2008-03-14 16:34:57 UTC
Can you attach /var/log/ipaserver.log?

Comment 3 Thorsten Scherf 2008-03-14 22:52:00 UTC
there is no ipsserver.log, the only ipa related log is /var/log/ipa_error.log
and this one is empty.


Comment 4 Thorsten Scherf 2008-03-14 23:28:21 UTC
tried to install the server on f8 with enabled testing repo, got this error:

Configuring directory server:
  [1/16]: creating directory server user
  [2/16]: creating directory server instance
  [3/16]: adding default schema
  [4/16]: enabling memberof plugin
  [5/16]: enabling referential integrity plugin
  [6/16]: enabling distributed numeric assignment plugin
  [7/16]: configuring uniqueness plugin
  [8/16]: creating indices
  [9/16]: configuring ssl for ds instance
  [10/16]: configuring certmap.conf
  [11/16]: restarting directory server
  [12/16]: adding default layout
  [13/16]: configuring Posix uid/gid generation as first master
  [14/16]: adding master entry as first master
  [15/16]: initializing group membership
  [16/16]: configuring directory to start on boot
done configuring dirsrv.
Unexpected error - see ipaserver-install.log for details:
 {'desc': "Can't contact LDAP server"}
[root@tiffy ~]# ll /var/log/ipaserver-install.log
ls: cannot access /var/log/ipaserver-install.log: No such file or directory
[root@tiffy ~]# 


Comment 5 Rob Crittenden 2008-03-15 02:35:07 UTC
Well htat is some progress anyway. I think in the version you have the install
log goes into the current working directory.

Comment 6 Thorsten Scherf 2008-03-15 08:16:34 UTC
Created attachment 298136 [details]
rawhide-system: /tmp/ipaserver-install.log

Comment 7 Thorsten Scherf 2008-03-15 08:17:55 UTC
Created attachment 298137 [details]
f8-system: /tmp/ipaserver-install.log

Comment 8 Thorsten Scherf 2008-03-15 08:27:41 UTC
on both stations ipa-server-0.99-11 is used. on the rawhide box it looks like
the directory manager password is not coded correctly. as I said, when I use the
ldapmodify tool manually with the password I created during the setup, I get the
49 error as well. reseting the password fixes the problem. 

no idea what's going on on the f8 system where the ldapmodify works, but the
ldap server is not available.
 

Comment 9 Rob Crittenden 2008-03-16 03:12:01 UTC
What is your locale set to? Can you try setting to en_US.UTF-8 if it isn't already?

Comment 10 Thorsten Scherf 2008-03-16 13:20:01 UTC
on rhel5 and f8 this doesn't help to fix it, still the same issue with new locale:

[16/16]: configuring directory to start on boot
done configuring dirsrv.
Unexpected error - see ipaserver-install.log for details:
 {'desc': "Can't contact LDAP server"}
[root@rhel5 ~]# echo $LANG
en_US.UTF-8

will try to change the locale on the rawhide box as well, will do that tomorrow.
actually I don't have access to the box.




Comment 11 Rob Crittenden 2008-03-17 14:40:50 UTC
Ok, can you attach the directory server error log for a failed installation? It
can be found in /var/log/dirsrv/slapd-INSTANCE/errors

Comment 12 Thorsten Scherf 2008-03-18 07:51:55 UTC
Created attachment 298343 [details]
error log from rawhide system

Comment 13 Thorsten Scherf 2008-03-18 07:56:39 UTC
Created attachment 298344 [details]
error log from rhel5 system

Comment 14 Rob Crittenden 2008-03-19 15:44:46 UTC
That connect to LDAP thing sounds familiar. I worked on something similar where
it was trying to contact the wrong server. Can you try with an updated package
in rawhide: ipa-0.99-12.fc9

Similar updates are also in F-7 and F-8.

Comment 15 Thorsten Scherf 2008-03-20 16:24:11 UTC
on rawhide where I had this credential problem I still get the same error code
49 when running ipa-server-install with latest rawhide packages:

[root@fedora ~]# echo $LANG
en_US.UTF-8
[root@fedora ~]# rpm -q ipa-server
ipa-server-0.99-12.fc9.i386
[root@fedora ~]# 

install-log and error-log (dirsrv) attached.


Comment 16 Thorsten Scherf 2008-03-20 16:25:01 UTC
Created attachment 298712 [details]
ipaserver-install.log

Comment 17 Thorsten Scherf 2008-03-20 16:25:47 UTC
Created attachment 298713 [details]
errors

Comment 18 Thorsten Scherf 2008-03-20 16:26:57 UTC
keep in mind, this error is different than the one described on a f8/rhel5
system where the ldap connect error appears. on rawhide we have the problem that
the generated "directory manager" password is not accepted.


Comment 19 Simo Sorce 2008-03-20 17:34:01 UTC
What is your locale?
Are you using something different from utf-8 and using non ASCII characters in
your password ?

Comment 20 Thorsten Scherf 2008-03-20 18:09:06 UTC
LANG="en_US.UTF-8"

test password was "redhat123"


Comment 21 Thorsten Scherf 2008-03-20 18:59:39 UTC
additional info:

[root@fedora ~]# /usr/bin/ldapmodify -h 127.0.0.1 -xv -D cn="Directory Manager"
-w redhat123 -f /usr/share/ipa/memberof-conf.ldif
ldap_initialize( ldap://127.0.0.1 )
ldap_bind: Invalid credentials (49)

machine is a kvm running on f8.
 

Comment 22 Rob Crittenden 2008-03-20 20:20:53 UTC
Ok, let's try to simplify the problem and try setting up DS by hand. I think I
have all this syntax correct:

Put this into /var/lib/dirsrv/boot.ldif:

dn: dc=virt,dc=tuxgeek,dc=de
objectClass: top
objectClass: domain
objectClass: pilotObject
dc: virt
info: IPA V1.0

Put this into a file named setup.inf

[General]
FullMachineName=   fedora.virt.tuxgeek.de
SuiteSpotUserID=   dirsrv
ServerRoot=    /usr/lib/dirsrv
[slapd]
ServerPort=   389
ServerIdentifier=   VIRT-TUXGEEK-DE
Suffix=   dc=virt,dc=tuxgeek,dc=de
RootDN=   cn=Directory Manager
InstallLdifFile= /var/lib/dirsrv/boot.ldif
RootDNPwd= redhat123

Run:
/usr/sbin/setup-ds.pl --silent --logfile - -f setup.inf

Then see if you can authenticate to that. You may need to remove an existing
instance if there already is one. An easy way is to run
/usr/sbin/ipa-server-install and let it remove the instance for you, then ^C to
quit out of the installer.

Comment 23 Thorsten Scherf 2008-03-27 18:35:04 UTC
looks good:

[root@fedora ~]# /usr/sbin/setup-ds.pl --silent --logfile - -f setup.inf
[08/03/27:19:33:49] - [Setup] Info Your new DS instance 'VIRT-TUXGEEK-DE' was
successfully created.
Your new DS instance 'VIRT-TUXGEEK-DE' was successfully created.
[08/03/27:19:33:49] - [Setup] Success Exiting . . .
Log file is '-'

Exiting . . .
Log file is '-'

[root@fedora ~]# 


Comment 24 Thorsten Scherf 2008-03-27 18:36:33 UTC
when I call ipa-server-install I again got this:

The following operations may take some minutes to complete.
Please wait until the prompt is returned.
Configuring ntpd
  [1/4]: stopping ntpd
  [2/4]: writing configuration
  [3/4]: configuring ntpd to start on boot
  [4/4]: starting ntpd
done configuring ntpd.
Configuring directory server:
  [1/16]: creating directory server user
  [2/16]: creating directory server instance
  [3/16]: adding default schema
  [4/16]: enabling memberof plugin
root        : CRITICAL Failed to load memberof-conf.ldif: Command
'/usr/bin/ldapmodify -h 127.0.0.1 -xv -D cn=Directory Manager -w redhat123 -f
/usr/share/ipa/memberof-conf.ldif' returned non-zero exit status 49
  [5/16]: enabling referential integrity plugin
root        : CRITICAL Failed to load referint-conf.ldif: Command
'/usr/bin/ldapmodify -h 127.0.0.1 -xv -D cn=Directory Manager -w redhat123 -f
/usr/share/ipa/referint-conf.ldif' returned non-zero exit status 49
  [6/16]: enabling distributed numeric assignment plugin
root        : CRITICAL Failed to load dna-conf.ldif: Command
'/usr/bin/ldapmodify -h 127.0.0.1 -xv -D cn=Directory Manager -w redhat123 -f
/usr/share/ipa/dna-conf.ldif' returned non-zero exit status 49
  [7/16]: configuring uniqueness plugin
root        : CRITICAL Failed to load unique-attributes.ldif: Command
'/usr/bin/ldapmodify -h 127.0.0.1 -xv -D cn=Directory Manager -w redhat123 -f
/tmp/tmpOPOdA3' returned non-zero exit status 49
  [8/16]: creating indices
root        : CRITICAL Failed to load indices.ldif: Command '/usr/bin/ldapmodify
-h 127.0.0.1 -xv -D cn=Directory Manager -w redhat123 -f
/usr/share/ipa/indices.ldif' returned non-zero exit status 49
  [9/16]: configuring ssl for ds instance
Unexpected error - see ipaserver-install.log for details:
 {'desc': 'Invalid credentials'}


Comment 25 Masato Taruishi 2008-04-16 06:43:44 UTC
It seems that the latest version of nss library rejects children to
use the security context. Therefore, ns-slapd can't use SHA  which breaks
authentication by rootdn created by setup-ds.pl even though authenticating by
pwdhash works. It's not the problem of ipa but fedora-ds.

See the following thread for more detail.
  
https://bugzilla.mozilla.org/show_bug.cgi?id=331096


Comment 26 Rich Megginson 2008-04-16 13:47:32 UTC
(In reply to comment #25)
> It seems that the latest version of nss library rejects children to
> use the security context. Therefore, ns-slapd can't use SHA  which breaks
> authentication by rootdn created by setup-ds.pl even though authenticating by
> pwdhash works. It's not the problem of ipa but fedora-ds.
> 
> See the following thread for more detail.
>   
> https://bugzilla.mozilla.org/show_bug.cgi?id=331096
> 

This has been fixed in fedora-ds-base in rawhide.


Comment 27 Masato Taruishi 2008-04-17 03:15:38 UTC
(In reply to comment #26)
> (In reply to comment #25)
> > It seems that the latest version of nss library rejects children to
> > use the security context. Therefore, ns-slapd can't use SHA  which breaks
> > authentication by rootdn created by setup-ds.pl even though authenticating by
> > pwdhash works. It's not the problem of ipa but fedora-ds.
> > 
> > See the following thread for more detail.
> >   
> > https://bugzilla.mozilla.org/show_bug.cgi?id=331096
> > 
> 
> This has been fixed in fedora-ds-base in rawhide.
> 

I could reproduce the problem as of the release fedora-ds-base-1.1.0-1.3.fc9.
Maybe you forget to apply the patch in this release. I'm goning
to check the latest upload which the patch is applied correctly today.


Comment 28 Thorsten Scherf 2008-04-25 14:34:04 UTC
same for me, usinf fedora-ds-base from todays rawhide, error is still the same.

Comment 29 Rich Megginson 2008-04-25 15:08:23 UTC
(In reply to comment #28)
> same for me, usinf fedora-ds-base from todays rawhide, error is still the same.

F-9 or rawhide?  Note that fedora-ds-base-1.1.0.1-4 was just recently approved
for F-9 and doesn't appear to be in yet.

Comment 30 Thorsten Scherf 2008-04-25 15:27:22 UTC
rawhide

using fedora-ds-base-1.1.0.1-4 from koji fixed the problem. 

Comment 31 Bug Zapper 2008-05-14 06:02:37 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 32 Bug Zapper 2009-06-09 23:45:45 UTC
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 33 Bug Zapper 2009-07-14 16:13:14 UTC
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.