<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="en-NL" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Hello everyone,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Just my two cents too. Note you can map the *<b>user</b>* to the Kerberos SPN – this lets you have your squid proxy live outside of the AD.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Just setup the dedicated user in the AD, map SPN to it and export the keytab to your squid.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">See <a href="https://docs.diladele.com/administrator_guide_stable/active_directory/index.html">
https://docs.diladele.com/administrator_guide_stable/active_directory/index.html</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Downside – the password for that designated user needs to be non expiring or you’d be regenerating keytabs everytime the password changes. Which is not difficult anyway too.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Rafael Akchurin<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Diladele B.V.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> squid-users <squid-users-bounces@lists.squid-cache.org>
<b>On Behalf Of </b>L.P.H. van Belle<br>
<b>Sent:</b> Wednesday, 25 September 2019 17:02<br>
<b>To:</b> squid-users@lists.squid-cache.org<br>
<b>Subject:</b> Re: [squid-users] Kerberos nad keytab problem<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">I also had problems with msktutil.. so i suggest you try this, see below..
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">Im using it for few years and it always works (for me offcourse)..
</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">It should be pretty simple, but the site squid-cache (wiki) is in my opinion a bit outdated.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">And its for Amos to adapt it on the site.</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">Amos or Alex, please review below, you might want to add it.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">And add your parts to it, like running this without a correct spn.
</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">Its tested in use and and working since squid 3.1 upto 4.8.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">Tested on debian Wheezy (7) upto Buster (10)</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">Below assumes the server your setting up, does have an A and PTR record.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">(note, which should be added at the domain join of winbind, as of samba4.x )</span><o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">This is my howto.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">A Debian based, with Kerberos Auth against an Samba Active Directory<br>
Should be adaptable for any OS, should also work with MS Active Directory. </span>
<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">But since i dont have any, im not testing it.
</span><o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># Install a minimal OS, at install only choose base + ssh server.
</span><o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># Setup these variable for a copy/past, might be handy, and then "it just works"
</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># Obligated to set. # ADDOM;
</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># This should match the netbios (NT4) domain name in caps, per example from a login: NTDOM\username
</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">ADDOM="NTDOM"
</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># These should be fine, but if you have multiple ipnumbers and hostnames, you might want to adjust these.
</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">FQDN="$(hostname -f)"<br>
HOSTN="$(hostname -s)"<br>
<br>
# Requirements before you start installing the sofrware like: squid winbind krb5-user</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># Login, sudo to root.</span><o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># /etc/resolv.conf, set as followed.
<br>
#search must.match.your.primarydnsdomain.tld<br>
# nameserver ip_of_AD_DC</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># Verify it:
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">grep search /etc/resolv.conf</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">grep nameserver /etc/resolv.conf<o:p></o:p></span></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># If ok, then run :
</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">apt update </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">apt install squid winbind krb5-user -y</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># Just hit enter on every question, the defaults are fine. (verified in Debian).</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># And now verify /etc/krb5.conf<br>
less /etc/krb5.conf</span><o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># It should look like this :
<br>
#[libdefaults]<br>
# default_realm = YOUR.Detected_REALM.TLD </span><o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">#</span><o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># The following krb5.conf variables are only for MIT Kerberos.<br>
# kdc_timesync = 1<br>
# ccache_type = 4<br>
# forwardable = true<br>
# proxiable = true</span><o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># ... and more..
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"><br>
# >> P.s. i never touch krb5.conf, never needed, it "just works" << </span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># Set REALM Variable now, default should be ok. dont touch it.
<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">REALM="$(grep default_realm /etc/krb5.conf |awk {' print $NF '}) "<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># It's used for smb.conf and the auth part of squid.
<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># then stop squid and samba and configure it.<br>
systemctl stop squid winbind</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># flush the log, so if you start it you start with a clean log. </span><o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">> /var/log/squid/cache.log</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># Configure smb.conf and join the AD domain, the minimal setting for smb.conf.<br>
cp /etc/samba/smb.conf{,.original}</span><o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">echo "# Auth-Only setup with winbind. ( no Shares )</span><o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"> workgroup = ${ADDOM}<br>
security = ADS<br>
realm = ${REALM}<br>
netbios name = $(echo ${HOSTN^^})</span><o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"> ## make sure the below number never overlap system ranges, see /etc/adduser.conf
<br>
## map id's outside to domain to tdb files.<br>
idmap config *: backend = tdb<br>
idmap config *: range = 2000-9999</span><o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"> ## map ids from the domain and (*) the range may not overlap !<br>
idmap config ${ADDOM} : backend = rid<br>
idmap config ${ADDOM} : range = 10000-3999999</span><o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"> kerberos method = secrets and keytab<br>
dedicated keytab file = /etc/krb5.keytab</span><o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"> # renew the kerberos ticket<br>
winbind refresh tickets = yes<br>
" > /etc/samba/smb.conf</span><o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># And verify it.<br>
less /etc/samba/smb.conf</span><o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># Next step, join the AD domain.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># Login/auth with kerberos.
<br>
kinit Administrator</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># and join the domain.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">net ads join -k</span><o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># Creating the squid keytab file.</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">export KRB5_KTNAME=FILE:/etc/squid/squid-HTTP-${HOSTN}.keytab<br>
net ads keytab ADD HTTP/${FQDN}</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"><br>
#Verify the keytab file : <br>
klist -ke /etc/squid/squid-HTTP-${HOSTN}.keytab</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># destroy you authentication ticket for Administrator.
</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">kdestroy
</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># set correct rights.
<br>
chmod 640 /etc/squid/squid-HTTP-${HOSTN}.keytab<br>
chown root:proxy /etc/squid/squid-HTTP-${HOSTN}.keytab<br>
# Note, you might need to change the "proxy" group name here. </span><o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># and setup you squid auth.
<br>
echo "auth_param negotiate program /usr/lib/squid/negotiate_wrapper_auth \\<br>
--kerberos /usr/lib/squid/negotiate_kerberos_auth \\<br>
-k etc/squid/squid-HTTP-${HOSTN}.keytab" \\<br>
-s HTTP/"${FQDN}"@"${REALM}" \\<br>
--ntlm /usr/bin/ntlm_auth \\<br>
--helper-protocol=gss-spnego --domain="${ADDOM}"</span><o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">auth_param negotiate children 30 startup=5 idle=5<br>
auth_param negotiate children 10<br>
auth_param negotiate keep_alive on" > /etc/squid/conf.d/auth.conf</span><o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">systemctl start winbind squid
</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># Done
</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"># And check squid log how it started.
</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">cat /var/log/squid/cache.log<o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">Now go configure the other parts you need of squid.
<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">And enjoy.. :-)
</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">Greetz,
</span><o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">Louis</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<blockquote style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt;margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div class="MsoNormal" align="center" style="text-align:center"><span lang="NL">
<hr size="2" width="100%" align="center">
</span></div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span lang="NL" style="font-size:10.0pt;font-family:"Tahoma",sans-serif">Van:</span></b><span lang="NL" style="font-size:10.0pt;font-family:"Tahoma",sans-serif"> squid-users [<a href="mailto:squid-users-bounces@lists.squid-cache.org">mailto:squid-users-bounces@lists.squid-cache.org</a>]
<b>Namens </b>Tevfik Ceydeliler<br>
<b>Verzonden:</b> woensdag 25 september 2019 13:59<br>
<b>Aan:</b> <a href="mailto:squid-users@lists.squid-cache.org">squid-users@lists.squid-cache.org</a><br>
<b>Onderwerp:</b> [squid-users] Kerberos nad keytab problem</span><span lang="NL"><o:p></o:p></span></p>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066">Hi, I try to use kerberos in my squid. Nut I get an error message :<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066">############################33<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066">msktutil --auto-update --verbose --computer-name suqidpnb1 --server dctoyo1.toyo.grp -k /etc/squid/PROXY.keytab <br>
-- init_password: Wiping the computer password structure<br>
-- generate_new_password: Generating a new, random password for the computer account<br>
-- generate_new_password: Characters read from /dev/urandom = 95<br>
-- create_fake_krb5_conf: Created a fake krb5.conf file: /tmp/.msktkrb5.conf-QCbGC5<br>
-- destroy_g_context: Destroying Kerberos Context<br>
-- initialize_g_context: Creating Kerberos Context<br>
-- finalize_exec: SAM Account Name is: suqidpnb1$<br>
-- try_machine_keytab_princ: Trying to authenticate for suqidpnb1$ from local keytab<br>
-- try_machine_keytab_princ: Error: krb5_get_init_creds_keytab failed (Key table entry not found)<br>
-- try_machine_keytab_princ: Authentication with keytab failed<br>
-- try_machine_keytab_princ: Trying to authenticate for SUQIDPNB1$ from local keytab<br>
-- try_machine_keytab_princ: Error: krb5_get_init_creds_keytab failed (Key table entry not found)<br>
-- try_machine_keytab_princ: Authentication with keytab failed<br>
-- try_machine_keytab_princ: Trying to authenticate for host/localhost from local keytab<br>
-- try_machine_keytab_princ: Error: krb5_get_init_creds_keytab failed (Key table entry not found)<br>
-- try_machine_keytab_princ: Authentication with keytab failed<br>
-- try_machine_password: Trying to authenticate for suqidpnb1$ with password<br>
-- create_default_machine_password: Default machine password for suqidpnb1$ is suqidpnb1<br>
-- try_machine_password: Error: krb5_get_init_creds_keytab failed (Client not found in Kerberos database)<br>
-- try_machine_password: Authentication with password failed<br>
-- try_user_creds: Checking if default ticket cache has tickets<br>
-- try_user_creds: Error: krb5_cc_get_principal failed (No credentials cache found)<br>
-- try_user_creds: User ticket cache was not valid<br>
Error: could not find any credentials to authenticate with. Neither keytab,<br>
default machine password, nor calling user's tickets worked. Try<br>
"kinit"ing yourself some tickets with permission to create computer<br>
objects, or pre-creating the computer object in AD and selecting<br>
'reset account'.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066">#############################33<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066">Can't find why this happen:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066">My AD is 2012R2 function level<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066">I create keytab with this:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066">msktutil -c -b "OU=Servers,DC=toyo,DC=grp" -s HTTP/squidtoyopnb1.toyo.grp -k /etc/squid/PROXY.keytab --computer-name SQUIDPNB1 --upn HTTP/squidtoyopnb1.toyo.grp --server dctoyo1.toyo.grp
--verbose --enctypes 28<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066">Keytab file permission is:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066">-rw-r----- 1 root squid 933 Sep 25 13:37 PROXY.keytab<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066">and keytab file (klist -k output):<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066"> 3
<a href="mailto:SQUIDPNB1$@TOYO.GRP">SQUIDPNB1$@TOYO.GRP</a><br>
3 <a href="mailto:SQUIDPNB1$@TOYO.GRP">SQUIDPNB1$@TOYO.GRP</a><br>
3 <a href="mailto:SQUIDPNB1$@TOYO.GRP">SQUIDPNB1$@TOYO.GRP</a><br>
3 <a href="mailto:HTTP/squidtoyopnb1.toyo.grp@TOYO.GRP">HTTP/squidtoyopnb1.toyo.grp@TOYO.GRP</a><br>
3 <a href="mailto:HTTP/squidtoyopnb1.toyo.grp@TOYO.GRP">HTTP/squidtoyopnb1.toyo.grp@TOYO.GRP</a><br>
3 <a href="mailto:HTTP/squidtoyopnb1.toyo.grp@TOYO.GRP">HTTP/squidtoyopnb1.toyo.grp@TOYO.GRP</a><br>
3 <a href="mailto:host/squidtoyopnb1@TOYO.GRP">host/squidtoyopnb1@TOYO.GRP</a><br>
3 <a href="mailto:host/squidtoyopnb1@TOYO.GRP">host/squidtoyopnb1@TOYO.GRP</a><br>
3 <a href="mailto:host/squidtoyopnb1@TOYO.GRP">host/squidtoyopnb1@TOYO.GRP</a><br>
3 <a href="mailto:host/squidtoyopnb1.toyo.grp@TOYO.GRP">host/squidtoyopnb1.toyo.grp@TOYO.GRP</a><br>
3 <a href="mailto:host/squidtoyopnb1.toyo.grp@TOYO.GRP">host/squidtoyopnb1.toyo.grp@TOYO.GRP</a><br>
3 <a href="mailto:host/squidtoyopnb1.toyo.grp@TOYO.GRP">host/squidtoyopnb1.toyo.grp@TOYO.GRP</a><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066">krb5.conf:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066">[libdefaults]<br>
default_realm = TOYO.GRP<br>
dns_lookup_kdc = no<br>
dns_lookup_realm = no<br>
ticket_lifetime = 24h<br>
default_keytab_name = /etc/squid/PROXY.keytab<br>
<br>
; for Windows 2008 with AES<br>
default_tgs_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5<br>
default_tkt_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5<br>
permitted_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5<br>
<br>
[realms]<br>
TOYO.GRP = {<br>
kdc = dctoyo1.toyo.grp<br>
kdc = DCTOYO2.toyo.grp<br>
admin_server = 10.65.12.254<br>
default_domain = toyo.grp<br>
}<br>
<br>
[domain_realm]<br>
toyo.grp = TOYO.GRP<br>
.toyo.grp = TOYO.GRP<br>
<br>
[logging]<br>
kdc = FILE:/var/log/kdc.log<br>
admin_server = FILE:/var/log/kadmin.log<br>
default = FILE:/var/log/krb5lib.log<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana",sans-serif;color:#000066"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<p class="MsoNormal">Tevfik Ceydeliler<o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
</body>
</html>