<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>tom's blog &#187; kerberos</title>
	<atom:link href="http://tom.knaupp.com/tag/kerberos/feed/" rel="self" type="application/rss+xml" />
	<link>http://tom.knaupp.com</link>
	<description>free software, security and a bunch of my strange thoughts</description>
	<lastBuildDate>Tue, 23 Mar 2010 22:38:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Howto: Single Sign On with Squid Proxy and Active Directory</title>
		<link>http://tom.knaupp.com/2007/12/12/howto-single-sign-on-with-squid-proxy-and-active-directory/</link>
		<comments>http://tom.knaupp.com/2007/12/12/howto-single-sign-on-with-squid-proxy-and-active-directory/#comments</comments>
		<pubDate>Wed, 12 Dec 2007 18:30:55 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Memento]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[kerberos]]></category>
		<category><![CDATA[single sign on]]></category>
		<category><![CDATA[squid]]></category>
		<category><![CDATA[username]]></category>

		<guid isPermaLink="false">http://tom.knaupp.com/2007/12/12/howto-single-sign-on-with-squid-proxy-and-active-directory/</guid>
		<description><![CDATA[Tested on: openSUSE 10.2, Squid 2.6 &#60;-&#62; Windows Server 2003 Goal: User authentication should be possible without &#8220;extra login&#8221; on the squid proxy. Here we go &#8230; First of all, disable nscd (name service cache daemon)! Install winbind, samba client and kerberos tools In this test enviroment, the Domain is &#8220;D1COMP&#8221;; the realm &#8220;D1COMP.LAN&#8221; Edit [...]]]></description>
			<content:encoded><![CDATA[<p>Tested on:  openSUSE 10.2, Squid 2.6 &lt;-&gt; Windows Server 2003<br />
Goal: User authentication should be possible without &#8220;extra login&#8221; on the squid proxy.<br />
<br />
<img src="http://tom.knaupp.com/wp-content/uploads/squidlog.png" alt="Squid Logfile" /><br />
<br />
Here we go &#8230;<br />
<span id="more-76"></span></p>
<ul>
<li>First of all, disable nscd (name service cache daemon)!</li>
<li>Install winbind, samba client and kerberos tools</li>
</ul>
<p>In this test enviroment, the Domain is &#8220;D1COMP&#8221;; the realm &#8220;D1COMP.LAN&#8221;</p>
<ul>
<li>Edit /etc/krb5.conf</li>
</ul>
<p><code><br />
[libdefaults]<br />
default_realm = D1COMP.LAN<br />
clockskew = 300</code><code><br />
[realms]<br />
D1COMP.LAN = {<br />
kdc = 172.31.7.27   ## One of your Domain Controllers<br />
default_domain = d1comp.lan<br />
admin_server = 172.31.7.27<br />
}</code><code><br />
[logging]<br />
kdc = FILE:/var/log/krb5/krb5kdc.log<br />
admin_server = FILE:/var/log/krb5/kadmind.log<br />
default = SYSLOG:NOTICE:DAEMON<br />
</code><code><br />
[domain_realm]<br />
.d1comp.lan = D1COMP.LAN<br />
</code><code><br />
[appdefaults]<br />
pam = {<br />
ticket_lifetime = 1d<br />
renew_lifetime = 1d<br />
forwardable = true<br />
proxiable = false<br />
retain_after_close = false<br />
minimum_uid = 1<br />
}</code></p>
<ul>
<li>obtain Kerberos ticket</li>
</ul>
<p><code><br />
# kinit Administrator@D1COMP.LAN<br />
Password for Administrator@D1COMP.LAN:<br />
#<br />
</code></p>
<ul>
<li>check Kerberos ticket</li>
</ul>
<p><code><br />
# klist<br />
Ticket cache: FILE:/tmp/krb5cc_0<br />
Default principal: Administrator@D1COMP.LAN<br />
--------<br />
Valid starting     Expires            Service principal<br />
12/12/07 16:16:01  12/13/07 02:16:45  krbtgt/D1COMP.LAN@D1COMP.LAN<br />
renew until 12/13/07 16:16:01<br />
--------<br />
Kerberos 4 ticket cache: /tmp/tkt0<br />
klist: You have no tickets cached<br />
</code></p>
<ul>
<li>Adjust /etc/samba/smb.conf</li>
</ul>
<p><code><br />
[global]<br />
workgroup = D1COMP<br />
printing = cups<br />
printcap name = cups<br />
printcap cache time = 750<br />
cups options = raw<br />
map to guest = Bad User<br />
include = /etc/samba/dhcp.conf<br />
logon path = \\%L\profiles\.msprofile<br />
logon home = \\%L\%U\.9xprofile<br />
logon drive = P:<br />
usershare allow guests = No<br />
idmap gid = 10000-20000<br />
idmap uid = 10000-20000<br />
realm = D1COMP.LAN<br />
security = ADS<br />
template homedir = /home/%D/%U<br />
template shell = /bin/bash<br />
winbind refresh tickets = yes<br />
</code></p>
<ul>
<li>Join the Active Directory</li>
</ul>
<p><code><br />
# net join -S d1comp -UAdministrator%Password<br />
Using short domain name -- D1COMP<br />
Joined 'SERVER' to realm 'D1COMP.LAN'<br />
</code><code><br />
# /etc/init.d/winbind start<br />
Starting Samba WINBIND daemon   ...         done<br />
</code></p>
<ul>
<li>Basic Check:</li>
</ul>
<p><code><br />
# wbinfo -t<br />
checking the trust secret via RPC calls succeeded<br />
</code><code><br />
# wbinfo -g<br />
D1COMP\domain guests<br />
D1COMP\domain users<br />
D1COMP\...<br />
</code></p>
<ul>
<li>Check support of ntlm authentication:</li>
</ul>
<p><code><br />
# wbinfo -a d1comp\\user%password<br />
plaintext password authentication succeeded<br />
challenge/response password authentication succeeded<br />
</code><br />
<em>ntlm_auth requires access to the privileged winbind pipe in order to function properly</em>.</p>
<ul>
<li>Enable this by changing group of the winbind_privileged directory to the group you run Squid as (cache_effective_group setting in squid.conf).</li>
</ul>
<p><code><br />
chgrp squid /var/lib/samba/winbindd_privileged</code></p>
<ul>
<li>Edit squid.conf to enable both the winbind basic and ntlm authenticators. IE will use ntlm and everything else basic:</li>
</ul>
<p><code><br />
auth_param ntlm program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp<br />
auth_param ntlm children 10<br />
#auth_param ntlm max_challenge_reuses 0<br />
#auth_param ntlm max_challenge_lifetime 2 minutes<br />
#auth_param ntlm use_ntlm_negotiate off<br />
auth_param basic program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-basic<br />
auth_param basic children 5<br />
auth_param basic realm Domain Proxy Server<br />
auth_param basic credentialsttl 2 hours<br />
auth_param basic casesensitive off<br />
authenticate_cache_garbage_interval 10 seconds<br />
##<br />
# Credentials past their TTL are removed from memory<br />
authenticate_ttl 0 seconds<br />
##<br />
## acl entries to require authentication:<br />
acl AuthorizedUsers proxy_auth REQUIRED<br />
http_access allow all AuthorizedUsers<br />
</code><br />
<br />
This howto is no guarantee to get it work, but kind of reminder for me : /<br />
Special thanks to <a href="http://wiki.squid-cache.org/ConfigExamples/WindowsAuthenticationNTLM">Adrian Chadd</a> and <a href="http://wiki.squid-cache.org/SquidFaq/ProxyAuthentication">the wiki @ squid-cache.org</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://tom.knaupp.com/2007/12/12/howto-single-sign-on-with-squid-proxy-and-active-directory/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
