<div class="gmail_quote">2009/5/27 Daniel Scott <span dir="ltr"><<a href="mailto:djscott@mit.edu">djscott@mit.edu</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<div class="im"><br>
2009/5/13 Simo Sorce <<a href="mailto:ssorce@redhat.com">ssorce@redhat.com</a>>:<br>
</div><div><div></div><div class="h5">>> I have a FreeIPA server configured and working. I'm now trying to<br>
>> automate a few processes and have a question regarding user keytabs.<br>
>> I'm looking to enable passwordless authentication/login for a<br>
>> particular user.<br>
>><br>
>> I have followed the instructions found here:<br>
>> <a href="http://kb.iu.edu/data/aumh.html" target="_blank">http://kb.iu.edu/data/aumh.html</a><br>
>><br>
>> >From the above page, it appears that I can do this using a user<br>
>> keytab. I have created a user named 'backup' and given it a good,<br>
>> long<br>
>> password. I then created a user keytab file using the following<br>
>> command:<br>
>><br>
>> # ktutil<br>
>> ktutil: addent -password -p backup -k 1 -e des-cbc-crc<br>
>> ktutil: addent -password -p backup -k 2 -e des3-cbc-sha1<br>
>> ktutil: wkt /etc/backup.keytab<br>
>><br>
>> I can display the contents of this keytab and it appears to have been<br>
>> created successfully. Then, I should be able to authenticate using<br>
>> the<br>
>> following command, correct?<br>
>><br>
>> # kinit backup -k -t /etc/backup.keytab<br>
>> kinit(v5): Key table entry not found while getting initial<br>
>> credentials<br>
>><br>
>> The server logs show the following:<br>
>><br>
>> May 12 11:54:34 <a href="http://example.com" target="_blank">example.com</a> krb5kdc[12175](info): AS_REQ (7 etypes<br>
>> {18<br>
>> 17 16 23 1 3 2}) <a href="http://192.168.1.50" target="_blank">192.168.1.50</a>: NEEDED_PREAUTH: <a href="mailto:backup@EXAMPLE.COM">backup@EXAMPLE.COM</a> for<br>
>> krbtgt/<a href="http://EXAMPLE.COM" target="_blank">EXAMPLE.COM</a>@<a href="http://EXAMPLE.COM" target="_blank">EXAMPLE.COM</a>, Additional pre-authentication<br>
>> required<br>
><br>
> This is fine, I need the next line in the log to see what's the problem.<br>
> If you don't have a next line, then something is definitely "Wrong"<br>
><br>
>> I have tried numerous combinations of the username in the kinit<br>
>> command, but I cannot obtain a ticket. Does anyone have any<br>
>> suggestions? Am I approaching this in the wrong way? Am I using the<br>
>> wrong hashing algorithm?<br>
>><br>
>> A little more background information:<br>
>> 1. The backup.keytab has permissions 600 and is owned by backup.<br>
>> 2. I have also tried this as root.<br>
><br>
> I don't have enough information to be sure (logs) but one of your problems<br>
> maybe that you came up with arbitrary (as in made up) kvno numbers.<br>
> (the -k option to addent in ktutil).<br>
<br>
</div></div>Does anyone have any more suggestions for this? I've tried explicitly<br>
stating the kvno, but no luck. It just seems like the keytab file is<br>
not being recognised correctly. I still get the log message above, but<br>
the error message on the command line looks like the kinit command<br>
isn't even hitting the server - the error seems to be with the keytab<br>
file.<br>
<br>
Am I even approaching this in the correct way? All my searching on the<br>
web seems to find information related to service principals rather<br>
than user principals. There are another couple of sites which mention<br>
principals such as username/<a href="mailto:admin@EXAMPLE.COM">admin@EXAMPLE.COM</a> which I'm unsure about.<br>
<br>
It's very strange that I can extract the keytab entry for a principal,<br>
but then am told that the entry does not exist. Has anyone seen this<br>
before?</blockquote><div> </div></div>Hi,<br>
<br>
This problem still occurs. I've worked around it by using the standard fedora user authorization/authentication, but it's not really the best way to go about it. I'm still not sure if I'm even going about this the right way. Is there actually such a thing as a 'user principal'. There must be a way for an automated process to obtain a kerberos ticket. Maybe I'm going about this the wrong way?<br>
<br>Any suggestions would be greatly appreciated. Does anyone have this or something similar working?<br><br>Thanks,<br><br>Dan<br><br>-------------------------------<br><a href="http://danieljamesscott.org">http://danieljamesscott.org</a><br>