LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-22-2012, 07:32 AM   #1
samanka80
Member
 
Registered: Aug 2012
Posts: 85

Rep: Reputation: Disabled
Question Problem with Kerberos // kinit: password incorrect / initial login


Hello everyone!

I am trying to configure my ldap on freebsd 9 so that I can authenticate users against active directory.

For that I am going to need krb5, I have installed it, it is running cute but when I try to kinit some-user I have a weired problem... lets start from the top, here is my configuration of krb5.conf:



[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log

[libdefaults]
default_realm = seth.local
dns_lookup_realm = false
dns_lookup_kdc = false
ticket_lifetime = 24h
forwardable = yes

[realms]
seth.local = {
kdc = WIN-SRV.seth.local:88
admin_server = WIN-SRV.seth.local:749
default_domain = seth.local
}

[domain_realm]
.seth.local = SETH.LOCAL
seth.local = SETH.LOCAL




seth.local is my domain and WIN-SRV is my active directory server...

Now I am trying to kinit some user who actually exists on my active directory, here is the result:

[root@ldap /usr/home/neda]# kinit alex
alex@seth.local's Password: //I entered the password here//
kinit: Password incorrect

And then, I try to login with username which doesn't exist at all! And I have:

[root@ldap /usr/home/neda]# kinit jklsajdlkssdasdsa
jklsajdlks@seth.local's Password: //kjaskljdaskvcbylj user doesn't exist, who cares??//
kinit: krb5_get_init_creds: Client (jklsajdlks@seth.local) unknown

You see? I think kerberos is seeing my active directory perfectly, but I don't know why I see the "password incorrect" message! I am sure that I'm entering the password correctlly! Should I config any special password for kerberos to access active directory and if so, where?? what do you think my problem is??

please please please save me!
 
Old 08-22-2012, 06:58 PM   #2
TheMadIndian
Member
 
Registered: Dec 2007
Distribution: Fedora Slackware CentOS slax RHEL
Posts: 117

Rep: Reputation: 23
Quote:
Originally Posted by samanka80 View Post
Hello everyone!

I am trying to configure my ldap on freebsd 9 so that I can authenticate users against active directory.

For that I am going to need krb5, I have installed it, it is running cute but when I try to kinit some-user I have a weired problem... lets start from the top, here is my configuration of krb5.conf:



[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log

[libdefaults]
default_realm = seth.local
dns_lookup_realm = false
dns_lookup_kdc = false
ticket_lifetime = 24h
forwardable = yes

[realms]
seth.local = {
kdc = WIN-SRV.seth.local:88
admin_server = WIN-SRV.seth.local:749
default_domain = seth.local
}

[domain_realm]
.seth.local = SETH.LOCAL
seth.local = SETH.LOCAL




seth.local is my domain and WIN-SRV is my active directory server...

Now I am trying to kinit some user who actually exists on my active directory, here is the result:

[root@ldap /usr/home/neda]# kinit alex
alex@seth.local's Password: //I entered the password here//
kinit: Password incorrect

And then, I try to login with username which doesn't exist at all! And I have:

[root@ldap /usr/home/neda]# kinit jklsajdlkssdasdsa
jklsajdlks@seth.local's Password: //kjaskljdaskvcbylj user doesn't exist, who cares??//
kinit: krb5_get_init_creds: Client (jklsajdlks@seth.local) unknown

You see? I think kerberos is seeing my active directory perfectly, but I don't know why I see the "password incorrect" message! I am sure that I'm entering the password correctlly! Should I config any special password for kerberos to access active directory and if so, where?? what do you think my problem is??

please please please save me!
Are the domain names the same on freebsd box and active directory?
Does resolv.conf have domain and nameserver (AD's name server)?
Is the time in sync between FreeBSD and the domain controller?
In krb5.conf under libdefaults the domain should be all caps not lower case
In krb5.conf the seth.local = { under realms should be SETH.LOCAL = {
In krb5.conf there should not be default_domain under realms in the SETH.LOCAL definition
 
1 members found this post helpful.
Old 08-24-2012, 02:09 AM   #3
samanka80
Member
 
Registered: Aug 2012
Posts: 85

Original Poster
Rep: Reputation: Disabled
Exclamation

Quote:
Originally Posted by TheMadIndian View Post
Are the domain names the same on freebsd box and active directory?
Does resolv.conf have domain and nameserver (AD's name server)?
Is the time in sync between FreeBSD and the domain controller?
In krb5.conf under libdefaults the domain should be all caps not lower case
In krb5.conf the seth.local = { under realms should be SETH.LOCAL = {
In krb5.conf there should not be default_domain under realms in the SETH.LOCAL definition
Thanks a lot for your help!! I also found out that I should generate a key with ktpass in my windows server and make kerberos use it! I used this command in windows::

ktpass /princ HOST/myldapname@SETH.LOCAl /mapuser DOMAIN\ldapuser
/crypto DES-CBC-MD5 +DesOnly /pass ldapuser-password /ptype
KRB5_NT_SRV_HST
/out c:\krb5.keytab

of course the ldap computer and the user should be defined before I use this command...

Then I copied this keytab file to /etc and it worked!

now that I klist in freebsd, I have this::


Principal: alex@SETH.LOCAL

Issued Expires Principal
Aug 24 09:00:07 Aug 24 19:00:07 krbtgt/SETH.LOCAL@SETH.LOCAL


is it correct?? is it the result I should expect? or something is wrong??

I kinit 2 or 3 users, but when I kinit, I just have the last one in the list... why??

Thanks again

Last edited by samanka80; 08-24-2012 at 02:25 AM.
 
Old 08-24-2012, 06:26 AM   #4
TheMadIndian
Member
 
Registered: Dec 2007
Distribution: Fedora Slackware CentOS slax RHEL
Posts: 117

Rep: Reputation: 23
Quote:
Originally Posted by samanka80 View Post
Thanks a lot for your help!! I also found out that I should generate a key with ktpass in my windows server and make kerberos use it! I used this command in windows::

ktpass /princ HOST/myldapname@SETH.LOCAl /mapuser DOMAIN\ldapuser
/crypto DES-CBC-MD5 +DesOnly /pass ldapuser-password /ptype
KRB5_NT_SRV_HST
/out c:\krb5.keytab

of course the ldap computer and the user should be defined before I use this command...

Then I copied this keytab file to /etc and it worked!

now that I klist in freebsd, I have this::


Principal: alex@SETH.LOCAL

Issued Expires Principal
Aug 24 09:00:07 Aug 24 19:00:07 krbtgt/SETH.LOCAL@SETH.LOCAL


is it correct?? is it the result I should expect? or something is wrong??

I kinit 2 or 3 users, but when I kinit, I just have the last one in the list... why??

Thanks again
are you running kinit from the same local user?
 
Old 08-24-2012, 06:36 AM   #5
samanka80
Member
 
Registered: Aug 2012
Posts: 85

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TheMadIndian View Post
are you running kinit from the same local user?

I am running it from my ldap server... and with different users.
 
Old 08-24-2012, 07:55 AM   #6
TheMadIndian
Member
 
Registered: Dec 2007
Distribution: Fedora Slackware CentOS slax RHEL
Posts: 117

Rep: Reputation: 23
Quote:
Originally Posted by samanka80 View Post
I am running it from my ldap server... and with different users.
I should've been more clear. I log into a computer as themadindian, I run klist and there is nothing
Code:
klist
klist: No credentials cache found (ticket cache FILE:/tmp/krb5cc_1000)
I kinit as themadindian to the whatever domain
Code:
kinit themadindian@WHATEVER.COM
Password for themadindian@WHATEVER.COM:
I run klist and I now have a ticket as themadindian
Code:
klist
Ticket cache: FILE:/tmp/krb5cc_1000
Default principal: themadindian@WHATEVER.COM

Valid starting     Expires            Service principal
08/24/12 08:43:02  08/24/12 18:43:40  krbtgt/WHATEVER.COM@WHATEVER.COM
	renew until 08/31/12 08:43:02
I run kinit again this time for administrator still logged in as themadindian
Code:
kinit administrator@WHATEVER.COM
Password for administrator@WHATEVER.COM:
I run klist again

Code:
klist
Ticket cache: FILE:/tmp/krb5cc_1000
Default principal: administrator@WHATEVER.COM

Valid starting     Expires            Service principal
08/24/12 08:43:22  08/24/12 18:44:01  krbtgt/WHATEVER.COM@WHATEVER.COM
your kerberos tickets will be the last user you authenticated as, so you can't kinit multiple users from a single user, that's what I was trying to say
 
2 members found this post helpful.
Old 08-24-2012, 08:01 AM   #7
samanka80
Member
 
Registered: Aug 2012
Posts: 85

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TheMadIndian View Post
I should've been more clear. I log into a computer as themadindian, I run klist and there is nothing
Code:
klist
klist: No credentials cache found (ticket cache FILE:/tmp/krb5cc_1000)
I kinit as themadindian to the whatever domain
Code:
kinit themadindian@WHATEVER.COM
Password for themadindian@WHATEVER.COM:
I run klist and I now have a ticket as themadindian
Code:
klist
Ticket cache: FILE:/tmp/krb5cc_1000
Default principal: themadindian@WHATEVER.COM

Valid starting     Expires            Service principal
08/24/12 08:43:02  08/24/12 18:43:40  krbtgt/WHATEVER.COM@WHATEVER.COM
	renew until 08/31/12 08:43:02
I run kinit again this time for administrator still logged in as themadindian
Code:
kinit administrator@WHATEVER.COM
Password for administrator@WHATEVER.COM:
I run klist again

Code:
klist
Ticket cache: FILE:/tmp/krb5cc_1000
Default principal: administrator@WHATEVER.COM

Valid starting     Expires            Service principal
08/24/12 08:43:22  08/24/12 18:44:01  krbtgt/WHATEVER.COM@WHATEVER.COM
your kerberos tickets will be the last user you authenticated as, so you can't kinit multiple users from a single user, that's what I was trying to say

Thanks alot, That's what I was looking for, I wondered if it shows just the last user or all the users logged in
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Login problem - Incorrect password? glock356 SUSE / openSUSE 1 12-01-2011 08:11 AM
kinit(v5): Client not found in Kerberos database while getting initial credentials greensuman Linux - Software 0 12-22-2010 01:23 AM
kinit: KDC reply did not match expectations while getting initial credentials mrizwanahmed Linux - Server 1 09-22-2010 10:44 PM
Initial Login Password? Completely Clueless Slackware 7 05-16-2009 07:02 AM
kinit missing from kerberos 5 installation aschmidt Linux - Newbie 1 06-17-2004 10:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration