Re: [Freeipa-users] gssapi sasl error - only picking up short hostname when running ipa-client-install (and failing) - SOLVED

2013-12-01 Thread Les Stott
Alexander, Petr, Martin,

Sorry for the delay, was the weekend. 

With your guidance I have figured out the issue. Using tcpdump I saw some 
references to a NIS domain that had been setup on the box. This was different 
to the domain name I setup for freeipa. Arp was also only showing short 
hostnames.

I modified /etc/nsswitch.conf so that nis was not in the picture

Hosts files dns

Then the ipa-client-install ran without problems. (It reset nsswitch.conf back 
to include nis afterwards)

Installing keyutils fixed the other error too.

Thanks for all your help.

Regards,

Les

-Original Message-
From: Alexander Bokovoy [mailto:aboko...@redhat.com] 
Sent: Saturday, 30 November 2013 12:32 AM
To: Les Stott
Cc: freeipa-users@redhat.com
Subject: Re: [Freeipa-users] gssapi sasl error - only picking up short hostname 
when running ipa-client-install (and failing)

On Fri, 29 Nov 2013, Les Stott wrote:
>Hi,
>
>Recently installed freeipa on two servers in multi-master mode. We want to 
>have a central authentication system for many hosts. Environment is RHEL 6.4 
>for servers, RHEL 6.1 for the first client host, standard rpm packages used - 
>ipa-server-3.0.0-26.el6_4.4.x86_64 and  ipa-client-3.0.0-37.el6.x86_64.
>
>I am now trying to add the first linux host to freeipa via ipa-client-install.
>
>When I run ipa-client-install on a host in debug mode it fails with 
>errors below  (I have changed hostnames and ip's, 
>freeipa-1.mydomain.com 192.168.1.22 and freeipa-2.mydomain.com 
>192.168.1.23, host client - host1 192.168.1.15)
>
>trying to retrieve CA cert via LDAP from ldap://freeipa-1.mydomain.com
>get_ca_cert_from_ldap() error: Local error SASL(-1): generic failure: 
>GSSAPI Error: Unspecified GSS failure.  Minor code may provide more 
>information (Server ldap/freeip...@mydomain.com not found in Kerberos 
>database)
>{'info': 'SASL(-1): generic failure: GSSAPI Error: Unspecified GSS 
>failure.  Minor code may provide more information (Server 
>ldap/freeip...@mydomain.com not found in Kerberos database)', 'desc': 
>'Local error'}
>
>The Kerberos logs on the server (free-ipa-1) show Nov 29 01:46:14 
>freeipa-1.mydomain.com krb5kdc[1616](info): TGS_REQ (4 etypes {18 17 16 
>23}) 192.168.1.15: UNKNOWN_SERVER: authtime 0,  admin@ MYDOMAIN.COM for 
>HTTP/ freeip...@mydomain.com, Server not found in Kerberos database
>
>The logs indicate that the service name is being used with the short hostname 
>(HTTP/ freeip...@mydomain.com<mailto:freeip...@mydomain.com>). The FreeIPA 
>server has records for HTTP/ 
>freeipa-1.mydomain@mydomain.com<mailto:freeipa-1.mydomain@mydomain.com>.
> I can see these in the web interface. I believe this is where it is stumbling.
>
>I've been banging my head against the wall on this one for a couple of days. 
>Everything I've found says make sure you have working dns, make sure you can 
>reverse lookup ip's, make sure hostnames are fqdn, make sure /etc/hosts on 
>server has ip's for servers listed with fqdn first and shortname second. I've 
>done all that.
>
>I am using external dns (not integrated with freeipa), and have populated all 
>records required as per sample config files provided during install. My time 
>servers are other servers too, but that shouldn't matter, everything is in 
>sync.
>
>; for Kerberos Auto Discovery
>; ldap servers
>_ldap._tcp  IN SRV 0 100 389freeipa-1.mydomain.com.
>_ldap._tcp  IN SRV 0 100 389freeipa-2.mydomain.com.
>
>;kerberos realm
>_kerberos   IN TXT MYDOMAIN.COM
>
>; kerberos servers
>_kerberos._tcp  IN SRV 0 100 88 freeipa-1.mydomain.com.
>_kerberos._tcp  IN SRV 0 100 88 freeipa-2.mydomain.com.
>_kerberos._udp  IN SRV 0 100 88 freeipa-1.mydomain.com.
>_kerberos._ucp  IN SRV 0 100 88 freeipa-2.mydomain.com.
>_kerberos-master._tcp   IN SRV 0 100 88 freeipa-1.mydomain.com.
>_kerberos-master._tcp   IN SRV 0 100 88 freeipa-2.mydomain.com.
>_kerberos-master._udp   IN SRV 0 100 88 freeipa-1.mydomain.com.
>_kerberos-master._udp   IN SRV 0 100 88 freeipa-2.mydomain.com.
>_kpasswd._tcp   IN SRV 0 100 464freeipa-1.mydomain.com.
>_kpasswd._tcp   IN SRV 0 100 464freeipa-2.mydomain.com.
>_kpasswd._udp   IN SRV 0 100 464freeipa-1.mydomain.com.
>_kpasswd._udp   IN SRV 0 100 464freeipa-2.mydomain.com.
>
>;ntp server
>_ntp._udp   IN SRV 0 100 123ntp1.mydomain.com.
>_ntp._udp   IN SRV 0 100 123ntp2.mydomain.com.
>
>Reverse dns entries are also available and both freeipa servers and the host I 
>am tr

Re: [Freeipa-users] gssapi sasl error - only picking up short hostname when running ipa-client-install (and failing)

2013-11-29 Thread Alexander Bokovoy

On Fri, 29 Nov 2013, Les Stott wrote:

Hi,

Recently installed freeipa on two servers in multi-master mode. We want to have 
a central authentication system for many hosts. Environment is RHEL 6.4 for 
servers, RHEL 6.1 for the first client host, standard rpm packages used - 
ipa-server-3.0.0-26.el6_4.4.x86_64 and  ipa-client-3.0.0-37.el6.x86_64.

I am now trying to add the first linux host to freeipa via ipa-client-install.

When I run ipa-client-install on a host in debug mode it fails with errors 
below  (I have changed hostnames and ip's, freeipa-1.mydomain.com 192.168.1.22 
and freeipa-2.mydomain.com 192.168.1.23, host client - host1 192.168.1.15)

trying to retrieve CA cert via LDAP from ldap://freeipa-1.mydomain.com
get_ca_cert_from_ldap() error: Local error SASL(-1): generic failure: GSSAPI 
Error: Unspecified GSS failure.  Minor code may provide more information 
(Server ldap/freeip...@mydomain.com not found in Kerberos database)
{'info': 'SASL(-1): generic failure: GSSAPI Error: Unspecified GSS failure.  
Minor code may provide more information (Server ldap/freeip...@mydomain.com not 
found in Kerberos database)', 'desc': 'Local error'}

The Kerberos logs on the server (free-ipa-1) show
Nov 29 01:46:14 freeipa-1.mydomain.com krb5kdc[1616](info): TGS_REQ (4 etypes 
{18 17 16 23}) 192.168.1.15: UNKNOWN_SERVER: authtime 0,  admin@ MYDOMAIN.COM 
for HTTP/ freeip...@mydomain.com, Server not found in Kerberos database

The logs indicate that the service name is being used with the short hostname (HTTP/ 
freeip...@mydomain.com). The FreeIPA server has 
records for HTTP/ 
freeipa-1.mydomain@mydomain.com. I 
can see these in the web interface. I believe this is where it is stumbling.

I've been banging my head against the wall on this one for a couple of days. 
Everything I've found says make sure you have working dns, make sure you can 
reverse lookup ip's, make sure hostnames are fqdn, make sure /etc/hosts on 
server has ip's for servers listed with fqdn first and shortname second. I've 
done all that.

I am using external dns (not integrated with freeipa), and have populated all 
records required as per sample config files provided during install. My time 
servers are other servers too, but that shouldn't matter, everything is in sync.

; for Kerberos Auto Discovery
; ldap servers
_ldap._tcp  IN SRV 0 100 389freeipa-1.mydomain.com.
_ldap._tcp  IN SRV 0 100 389freeipa-2.mydomain.com.

;kerberos realm
_kerberos   IN TXT MYDOMAIN.COM

; kerberos servers
_kerberos._tcp  IN SRV 0 100 88 freeipa-1.mydomain.com.
_kerberos._tcp  IN SRV 0 100 88 freeipa-2.mydomain.com.
_kerberos._udp  IN SRV 0 100 88 freeipa-1.mydomain.com.
_kerberos._ucp  IN SRV 0 100 88 freeipa-2.mydomain.com.
_kerberos-master._tcp   IN SRV 0 100 88 freeipa-1.mydomain.com.
_kerberos-master._tcp   IN SRV 0 100 88 freeipa-2.mydomain.com.
_kerberos-master._udp   IN SRV 0 100 88 freeipa-1.mydomain.com.
_kerberos-master._udp   IN SRV 0 100 88 freeipa-2.mydomain.com.
_kpasswd._tcp   IN SRV 0 100 464freeipa-1.mydomain.com.
_kpasswd._tcp   IN SRV 0 100 464freeipa-2.mydomain.com.
_kpasswd._udp   IN SRV 0 100 464freeipa-1.mydomain.com.
_kpasswd._udp   IN SRV 0 100 464freeipa-2.mydomain.com.

;ntp server
_ntp._udp   IN SRV 0 100 123ntp1.mydomain.com.
_ntp._udp   IN SRV 0 100 123ntp2.mydomain.com.

Reverse dns entries are also available and both freeipa servers and the host I 
am trying to configure ipa-client on can do lookups and receive fqdn's. They 
can all do reverse lookups that resolve correctly.

I have read that when using SASL/GSSAPI (Kerberos) authentication, its possible that the 
service provider sets the principal name (SPN) to "ldap/servername" in the 
TGS_REQ based on a dns query of the PTR record. I do have PTR's configured, and they have 
FQDN's. Is it true that this happens with GSSAPI? If so how can I get around that?

Reverse Zone File for 192.168.1
22  PTR   freeipa-1.mydomain.com.
23  PTR   freeipa-2.mydomain.com.

Nslookup results for each IP:
22.1.168.192.in-addr.arpa  name = freeipa-1.mydomain.com.
23.1.168.192.in-addr.arpa  name = freeipa-2.mydomain.com.

I can authenticate using kinit before running the script and it still doesn't 
work.

The short version of running the install shows:
Discovery was successful!
Hostname: host1.mydomain.com
Realm: MYDOMAIN.COM
DNS Domain: mydomain.com
IPA Server: freeipa-1.mydomain.com
BaseDN: dc=mydomain,dc=com

It authenticates correctly with the admin user for enrolling the host, but 
joining the realm fails.

I've tried everything I can think of.

Can you show your resolv.conf?
Can it be that it actually misses
   domain mydomain.com
stanza?



--
/ Alexand

Re: [Freeipa-users] gssapi sasl error - only picking up short hostname when running ipa-client-install (and failing)

2013-11-29 Thread Martin Kosek
On 11/29/2013 02:20 PM, Les Stott wrote:
> Martin,
> 
> there is no entries in /etc/hosts for the freeipa servers on the client.
> the clients hosts own entry is there with fqdn first.
> 
> Because you mentioned it, i added the hostname of both freeipa server to the 
> hosts file on the client. It actually ran and setup the client. However it 
> did get the following errors at the end after it did kerberos config

I checked the spec file for RHEL-6.4 and this is a bug (already fixed in
current upstream version). It does not include "keyutils" dependency. Thus, the
dependency may be missing in some super minimal RHELs and cause this error. If
you manuall install keyutils, this error should vanish.

# yum install keyutils

> 
> ===
> Configured /etc/krb5.conf for IPA realm MYDOMAIN.COM
> Traceback (most recent call last):
>   File "/usr/sbin/ipa-client-install", line 2377, in 
> sys.exit(main())
>   File "/usr/sbin/ipa-client-install", line 2363, in main
> rval = install(options, env, fstore, statestore)
>   File "/usr/sbin/ipa-client-install", line 2135, in install
> delete_persistent_client_session_data(host_principal)
>   File "/usr/lib/python2.6/site-packages/ipalib/rpc.py", line 124, in 
> delete_persistent_client_session_data
> kernel_keyring.del_key(keyname)
>   File "/usr/lib/python2.6/site-packages/ipapython/kernel_keyring.py", line 
> 99, in del_key
> real_key = get_real_key(key)
>   File "/usr/lib/python2.6/site-packages/ipapython/kernel_keyring.py", line 
> 45, in get_real_key
> (stdout, stderr, rc) = run(['keyctl', 'search', KEYRING, KEYTYPE, key], 
> raiseonerr=False)
>   File "/usr/lib/python2.6/site-packages/ipapython/ipautil.py", line 295, in 
> run
> close_fds=True, env=env, cwd=cwd)
>   File "/usr/lib64/python2.6/subprocess.py", line 639, in __init__
> errread, errwrite)
>   File "/usr/lib64/python2.6/subprocess.py", line 1220, in _execute_child
> raise child_exception
> OSError: [Errno 2] No such file or directory
> ===
> 
> Is that normal?

No.

> 
> Do i need to add entries to the hosts file on every client?

By all means no, you should not need to do that if your DNS is sane and
working. But if the addition to /etc/hosts helped, there must be something
wrong with the DNS.

Maybe there are wrong DNS PTR records cached? Do you have nscd daemon running?

Are you 100% sure that the software on the client machine resolves the FQDN of
the server when doing a reverse search?

$ host $IPA_SERVER_IP

HTH,
Martin

___
Freeipa-users mailing list
Freeipa-users@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-users


Re: [Freeipa-users] gssapi sasl error - only picking up short hostname when running ipa-client-install (and failing)

2013-11-29 Thread Petr Spacek

On 29.11.2013 14:20, Les Stott wrote:

Martin,

there is no entries in /etc/hosts for the freeipa servers on the client.
the clients hosts own entry is there with fqdn first.

Because you mentioned it, i added the hostname of both freeipa server to the 
hosts file on the client. It actually ran and setup the client. However it did 
get the following errors at the end after it did kerberos config

===
Configured /etc/krb5.conf for IPA realm MYDOMAIN.COM
Traceback (most recent call last):
   File "/usr/sbin/ipa-client-install", line 2377, in 
 sys.exit(main())
   File "/usr/sbin/ipa-client-install", line 2363, in main
 rval = install(options, env, fstore, statestore)
   File "/usr/sbin/ipa-client-install", line 2135, in install
 delete_persistent_client_session_data(host_principal)
   File "/usr/lib/python2.6/site-packages/ipalib/rpc.py", line 124, in 
delete_persistent_client_session_data
 kernel_keyring.del_key(keyname)
   File "/usr/lib/python2.6/site-packages/ipapython/kernel_keyring.py", line 
99, in del_key
 real_key = get_real_key(key)
   File "/usr/lib/python2.6/site-packages/ipapython/kernel_keyring.py", line 
45, in get_real_key
 (stdout, stderr, rc) = run(['keyctl', 'search', KEYRING, KEYTYPE, key], 
raiseonerr=False)
   File "/usr/lib/python2.6/site-packages/ipapython/ipautil.py", line 295, in 
run
 close_fds=True, env=env, cwd=cwd)
   File "/usr/lib64/python2.6/subprocess.py", line 639, in __init__
 errread, errwrite)
   File "/usr/lib64/python2.6/subprocess.py", line 1220, in _execute_child
 raise child_exception
OSError: [Errno 2] No such file or directory
===

Is that normal?
No, absolutely not. I will let people knowledgeable about kernel keyrings to 
chime in.



Do i need to add entries to the hosts file on every client?


Could you try this?
0) Restore your original /etc/hosts file (i.e. delete the line for IPA servers).
1) Run command "tcpdump -s 65535 -w /tmp/some_writeable_file -i any" on the 
client.

2) Run ipa-client-install
3) Stop tcpdump and send us the /tmp/some_writeable_file file. You can do it 
privately (for example to me or mkosek).


The network capture will not contain any password but it will reveal domain 
names and IP addresses. Your problem is most probably related to name 
resolution but I can't see where the problem is from your description, I hope 
that the network trace will reveal it.


Note: If you have some local caching DNS resolver *on the client* (unbound, 
BIND etc.), please flush it's caches before you start.


Petr^2 Spacek



From: Martin Kosek [mko...@redhat.com]
Sent: Friday, November 29, 2013 8:49 PM
To: Les Stott; freeipa-users@redhat.com
Subject: Re: [Freeipa-users] gssapi sasl error - only picking up short hostname 
when running ipa-client-install (and failing)

On 11/29/2013 09:16 AM, Les Stott wrote:

Hi,

Recently installed freeipa on two servers in multi-master mode. We want to have 
a central authentication system for many hosts. Environment is RHEL 6.4 for 
servers, RHEL 6.1 for the first client host, standard rpm packages used - 
ipa-server-3.0.0-26.el6_4.4.x86_64 and  ipa-client-3.0.0-37.el6.x86_64.

I am now trying to add the first linux host to freeipa via ipa-client-install.

When I run ipa-client-install on a host in debug mode it fails with errors 
below  (I have changed hostnames and ip's, freeipa-1.mydomain.com 192.168.1.22 
and freeipa-2.mydomain.com 192.168.1.23, host client - host1 192.168.1.15)

trying to retrieve CA cert via LDAP from ldap://freeipa-1.mydomain.com
get_ca_cert_from_ldap() error: Local error SASL(-1): generic failure: GSSAPI 
Error: Unspecified GSS failure.  Minor code may provide more information 
(Server ldap/freeip...@mydomain.com not found in Kerberos database)
{'info': 'SASL(-1): generic failure: GSSAPI Error: Unspecified GSS failure.  
Minor code may provide more information (Server ldap/freeip...@mydomain.com not 
found in Kerberos database)', 'desc': 'Local error'}

The Kerberos logs on the server (free-ipa-1) show
Nov 29 01:46:14 freeipa-1.mydomain.com krb5kdc[1616](info): TGS_REQ (4 etypes 
{18 17 16 23}) 192.168.1.15: UNKNOWN_SERVER: authtime 0,  admin@ MYDOMAIN.COM 
for HTTP/ freeip...@mydomain.com, Server not found in Kerberos database

The logs indicate that the service name is being used with the short hostname (HTTP/ 
freeip...@mydomain.com<mailto:freeip...@mydomain.com>). The FreeIPA server has 
records for HTTP/ 
freeipa-1.mydomain@mydomain.com<mailto:freeipa-1.mydomain@mydomain.com>. I 
can see these in the web interface. I believe this is where it is stumbling.

I've been banging my head against the wall on this one for a couple of days. 
Everything I've found says make sure you have working dns, make

Re: [Freeipa-users] gssapi sasl error - only picking up short hostname when running ipa-client-install (and failing)

2013-11-29 Thread Les Stott
Martin,

there is no entries in /etc/hosts for the freeipa servers on the client.
the clients hosts own entry is there with fqdn first.

Because you mentioned it, i added the hostname of both freeipa server to the 
hosts file on the client. It actually ran and setup the client. However it did 
get the following errors at the end after it did kerberos config

===
Configured /etc/krb5.conf for IPA realm MYDOMAIN.COM
Traceback (most recent call last):
  File "/usr/sbin/ipa-client-install", line 2377, in 
sys.exit(main())
  File "/usr/sbin/ipa-client-install", line 2363, in main
rval = install(options, env, fstore, statestore)
  File "/usr/sbin/ipa-client-install", line 2135, in install
delete_persistent_client_session_data(host_principal)
  File "/usr/lib/python2.6/site-packages/ipalib/rpc.py", line 124, in 
delete_persistent_client_session_data
kernel_keyring.del_key(keyname)
  File "/usr/lib/python2.6/site-packages/ipapython/kernel_keyring.py", line 99, 
in del_key
real_key = get_real_key(key)
  File "/usr/lib/python2.6/site-packages/ipapython/kernel_keyring.py", line 45, 
in get_real_key
(stdout, stderr, rc) = run(['keyctl', 'search', KEYRING, KEYTYPE, key], 
raiseonerr=False)
  File "/usr/lib/python2.6/site-packages/ipapython/ipautil.py", line 295, in run
close_fds=True, env=env, cwd=cwd)
  File "/usr/lib64/python2.6/subprocess.py", line 639, in __init__
errread, errwrite)
  File "/usr/lib64/python2.6/subprocess.py", line 1220, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
===

Is that normal?

Do i need to add entries to the hosts file on every client?

Regards,

Les



From: Martin Kosek [mko...@redhat.com]
Sent: Friday, November 29, 2013 8:49 PM
To: Les Stott; freeipa-users@redhat.com
Subject: Re: [Freeipa-users] gssapi sasl error - only picking up short hostname 
when running ipa-client-install (and failing)

On 11/29/2013 09:16 AM, Les Stott wrote:
> Hi,
>
> Recently installed freeipa on two servers in multi-master mode. We want to 
> have a central authentication system for many hosts. Environment is RHEL 6.4 
> for servers, RHEL 6.1 for the first client host, standard rpm packages used - 
> ipa-server-3.0.0-26.el6_4.4.x86_64 and  ipa-client-3.0.0-37.el6.x86_64.
>
> I am now trying to add the first linux host to freeipa via ipa-client-install.
>
> When I run ipa-client-install on a host in debug mode it fails with errors 
> below  (I have changed hostnames and ip's, freeipa-1.mydomain.com 
> 192.168.1.22 and freeipa-2.mydomain.com 192.168.1.23, host client - host1 
> 192.168.1.15)
>
> trying to retrieve CA cert via LDAP from ldap://freeipa-1.mydomain.com
> get_ca_cert_from_ldap() error: Local error SASL(-1): generic failure: GSSAPI 
> Error: Unspecified GSS failure.  Minor code may provide more information 
> (Server ldap/freeip...@mydomain.com not found in Kerberos database)
> {'info': 'SASL(-1): generic failure: GSSAPI Error: Unspecified GSS failure.  
> Minor code may provide more information (Server ldap/freeip...@mydomain.com 
> not found in Kerberos database)', 'desc': 'Local error'}
>
> The Kerberos logs on the server (free-ipa-1) show
> Nov 29 01:46:14 freeipa-1.mydomain.com krb5kdc[1616](info): TGS_REQ (4 etypes 
> {18 17 16 23}) 192.168.1.15: UNKNOWN_SERVER: authtime 0,  admin@ MYDOMAIN.COM 
> for HTTP/ freeip...@mydomain.com, Server not found in Kerberos database
>
> The logs indicate that the service name is being used with the short hostname 
> (HTTP/ freeip...@mydomain.com<mailto:freeip...@mydomain.com>). The FreeIPA 
> server has records for HTTP/ 
> freeipa-1.mydomain@mydomain.com<mailto:freeipa-1.mydomain@mydomain.com>.
>  I can see these in the web interface. I believe this is where it is 
> stumbling.
>
> I've been banging my head against the wall on this one for a couple of days. 
> Everything I've found says make sure you have working dns, make sure you can 
> reverse lookup ip's, make sure hostnames are fqdn, make sure /etc/hosts on 
> server has ip's for servers listed with fqdn first and shortname second. I've 
> done all that.

What about /etc/hosts on the clients? Do they also have FQDN first in case they
have server IP in there?

Martin

___
Freeipa-users mailing list
Freeipa-users@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-users


Re: [Freeipa-users] gssapi sasl error - only picking up short hostname when running ipa-client-install (and failing)

2013-11-29 Thread Martin Kosek
On 11/29/2013 09:16 AM, Les Stott wrote:
> Hi,
> 
> Recently installed freeipa on two servers in multi-master mode. We want to 
> have a central authentication system for many hosts. Environment is RHEL 6.4 
> for servers, RHEL 6.1 for the first client host, standard rpm packages used - 
> ipa-server-3.0.0-26.el6_4.4.x86_64 and  ipa-client-3.0.0-37.el6.x86_64.
> 
> I am now trying to add the first linux host to freeipa via ipa-client-install.
> 
> When I run ipa-client-install on a host in debug mode it fails with errors 
> below  (I have changed hostnames and ip's, freeipa-1.mydomain.com 
> 192.168.1.22 and freeipa-2.mydomain.com 192.168.1.23, host client - host1 
> 192.168.1.15)
> 
> trying to retrieve CA cert via LDAP from ldap://freeipa-1.mydomain.com
> get_ca_cert_from_ldap() error: Local error SASL(-1): generic failure: GSSAPI 
> Error: Unspecified GSS failure.  Minor code may provide more information 
> (Server ldap/freeip...@mydomain.com not found in Kerberos database)
> {'info': 'SASL(-1): generic failure: GSSAPI Error: Unspecified GSS failure.  
> Minor code may provide more information (Server ldap/freeip...@mydomain.com 
> not found in Kerberos database)', 'desc': 'Local error'}
> 
> The Kerberos logs on the server (free-ipa-1) show
> Nov 29 01:46:14 freeipa-1.mydomain.com krb5kdc[1616](info): TGS_REQ (4 etypes 
> {18 17 16 23}) 192.168.1.15: UNKNOWN_SERVER: authtime 0,  admin@ MYDOMAIN.COM 
> for HTTP/ freeip...@mydomain.com, Server not found in Kerberos database
> 
> The logs indicate that the service name is being used with the short hostname 
> (HTTP/ freeip...@mydomain.com). The FreeIPA 
> server has records for HTTP/ 
> freeipa-1.mydomain@mydomain.com.
>  I can see these in the web interface. I believe this is where it is 
> stumbling.
> 
> I've been banging my head against the wall on this one for a couple of days. 
> Everything I've found says make sure you have working dns, make sure you can 
> reverse lookup ip's, make sure hostnames are fqdn, make sure /etc/hosts on 
> server has ip's for servers listed with fqdn first and shortname second. I've 
> done all that.

What about /etc/hosts on the clients? Do they also have FQDN first in case they
have server IP in there?

Martin

___
Freeipa-users mailing list
Freeipa-users@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-users


[Freeipa-users] gssapi sasl error - only picking up short hostname when running ipa-client-install (and failing)

2013-11-29 Thread Les Stott
Hi,

Recently installed freeipa on two servers in multi-master mode. We want to have 
a central authentication system for many hosts. Environment is RHEL 6.4 for 
servers, RHEL 6.1 for the first client host, standard rpm packages used - 
ipa-server-3.0.0-26.el6_4.4.x86_64 and  ipa-client-3.0.0-37.el6.x86_64.

I am now trying to add the first linux host to freeipa via ipa-client-install.

When I run ipa-client-install on a host in debug mode it fails with errors 
below  (I have changed hostnames and ip's, freeipa-1.mydomain.com 192.168.1.22 
and freeipa-2.mydomain.com 192.168.1.23, host client - host1 192.168.1.15)

trying to retrieve CA cert via LDAP from ldap://freeipa-1.mydomain.com
get_ca_cert_from_ldap() error: Local error SASL(-1): generic failure: GSSAPI 
Error: Unspecified GSS failure.  Minor code may provide more information 
(Server ldap/freeip...@mydomain.com not found in Kerberos database)
{'info': 'SASL(-1): generic failure: GSSAPI Error: Unspecified GSS failure.  
Minor code may provide more information (Server ldap/freeip...@mydomain.com not 
found in Kerberos database)', 'desc': 'Local error'}

The Kerberos logs on the server (free-ipa-1) show
Nov 29 01:46:14 freeipa-1.mydomain.com krb5kdc[1616](info): TGS_REQ (4 etypes 
{18 17 16 23}) 192.168.1.15: UNKNOWN_SERVER: authtime 0,  admin@ MYDOMAIN.COM 
for HTTP/ freeip...@mydomain.com, Server not found in Kerberos database

The logs indicate that the service name is being used with the short hostname 
(HTTP/ freeip...@mydomain.com). The FreeIPA 
server has records for HTTP/ 
freeipa-1.mydomain@mydomain.com.
 I can see these in the web interface. I believe this is where it is stumbling.

I've been banging my head against the wall on this one for a couple of days. 
Everything I've found says make sure you have working dns, make sure you can 
reverse lookup ip's, make sure hostnames are fqdn, make sure /etc/hosts on 
server has ip's for servers listed with fqdn first and shortname second. I've 
done all that.

I am using external dns (not integrated with freeipa), and have populated all 
records required as per sample config files provided during install. My time 
servers are other servers too, but that shouldn't matter, everything is in sync.

; for Kerberos Auto Discovery
; ldap servers
_ldap._tcp  IN SRV 0 100 389freeipa-1.mydomain.com.
_ldap._tcp  IN SRV 0 100 389freeipa-2.mydomain.com.

;kerberos realm
_kerberos   IN TXT MYDOMAIN.COM

; kerberos servers
_kerberos._tcp  IN SRV 0 100 88 freeipa-1.mydomain.com.
_kerberos._tcp  IN SRV 0 100 88 freeipa-2.mydomain.com.
_kerberos._udp  IN SRV 0 100 88 freeipa-1.mydomain.com.
_kerberos._ucp  IN SRV 0 100 88 freeipa-2.mydomain.com.
_kerberos-master._tcp   IN SRV 0 100 88 freeipa-1.mydomain.com.
_kerberos-master._tcp   IN SRV 0 100 88 freeipa-2.mydomain.com.
_kerberos-master._udp   IN SRV 0 100 88 freeipa-1.mydomain.com.
_kerberos-master._udp   IN SRV 0 100 88 freeipa-2.mydomain.com.
_kpasswd._tcp   IN SRV 0 100 464freeipa-1.mydomain.com.
_kpasswd._tcp   IN SRV 0 100 464freeipa-2.mydomain.com.
_kpasswd._udp   IN SRV 0 100 464freeipa-1.mydomain.com.
_kpasswd._udp   IN SRV 0 100 464freeipa-2.mydomain.com.

;ntp server
_ntp._udp   IN SRV 0 100 123ntp1.mydomain.com.
_ntp._udp   IN SRV 0 100 123ntp2.mydomain.com.

Reverse dns entries are also available and both freeipa servers and the host I 
am trying to configure ipa-client on can do lookups and receive fqdn's. They 
can all do reverse lookups that resolve correctly.

I have read that when using SASL/GSSAPI (Kerberos) authentication, its possible 
that the service provider sets the principal name (SPN) to "ldap/servername" in 
the TGS_REQ based on a dns query of the PTR record. I do have PTR's configured, 
and they have FQDN's. Is it true that this happens with GSSAPI? If so how can I 
get around that?

Reverse Zone File for 192.168.1
22  PTR   freeipa-1.mydomain.com.
23  PTR   freeipa-2.mydomain.com.

Nslookup results for each IP:
22.1.168.192.in-addr.arpa  name = freeipa-1.mydomain.com.
23.1.168.192.in-addr.arpa  name = freeipa-2.mydomain.com.

I can authenticate using kinit before running the script and it still doesn't 
work.

The short version of running the install shows:
Discovery was successful!
Hostname: host1.mydomain.com
Realm: MYDOMAIN.COM
DNS Domain: mydomain.com
IPA Server: freeipa-1.mydomain.com
BaseDN: dc=mydomain,dc=com

It authenticates correctly with the admin user for enrolling the host, but 
joining the realm fails.

I've tried everything I can think of.

Please help.

Thanks,

Les
___
Freeipa-users mailing list
Freeipa-users@redhat.com
https://www.redhat.com/