• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

Squid im Active Directory

bolder

Member
Hallo zusammen!

Bevor jetzt jemand schreibt, ich soll die Suchfunktion bemühen oder mal googeln - das habe ich alles schon gemacht. Ich weiß, dass über das Thema schon viel geschrieben wurde (auch hier im Forum), habe allerdings keine Lösung für mein Problem gefunden.

Ich nutze SLES 9 mit Samba 3 und Squid 2.5

Folgendes habe ich durchgeführt:

1. Konfiguration von Kerberos:

in /etc/krb5.conf
Code:
[libdefaults]
	default_realm = HKVV.HESSEN.DE
	dns_lookup_kdc = false
	dns_lookup_realm = false
	
[realms]
	HKVV.HESSEN.DE = {
		default_domain = hkvv.hessen.de
		kdc = IP_Adresse_des_Domaincontrollers
	}

[domain_realm]
	.hkvv.hessen.de = HKVV.HESSEN.DE
	hkvv.hessen.de = HKVV.HESSEN.DE

[logging]
	default = SYSLOG:NOTICE:DAEMON
	kdc = FILE:/var/log/kdc.log
	kadmind = FILE:/var/log/kadmind.log

[appdefaults]
	pam = {
		ticket_lifetime = 1d
		renew_lifetime = 1d
		forwardable = true
		proxiable = true
		retain_after_close = false
		minimum_uid = 0
		debug = false
	}
2. Konfiguration von Samba:
in /etc/samba/smb.conf
Code:
[global]
	workgroup = HKVV
	server string = Linux-Samba-Server
	netbios name = Name_des_Proxy_Servers
	realm = HKVV.HESSEN.DE
	idmap uid = 10000-20000
	idmap gid = 10000-20000
	winbind separator = /
	winbind use default domain = yes
	security = ADS
	encrypt passwords = yes
	password server = Name_des_Domaincontrollers.hkvv.hessen.de
	client use spnego = yes

in /etc/nsswitch.conf
Code:
passwd:		files winbind
shadow:		files
group:		files winbind
hosts:		files dns
networks:	files dns
services:	files
protocols:	files
rpc:		files
ethers:		files
netmasks:	files
netgroup:	files
publickey:	files
bootparams:	files
automount:	files nis
aliases:	files


Der Domaincontroller ist zusätzlich beim Linux-Server in /etc/hosts eingetragen.

Der Samba-Server ist mit "join" im Active Directory aufgenommen und läuft dort als Member-Server.

wbinfo -g liefert mir alle Gruppen des Active Directory.

Gruppenzugehörigkeit von
/var/lib/samba/winbindd_privileged
ist nogroup.

3. Konfiguration von Squid:

Im Active Directory gibt es die Gruppe SQUID-User

in /etc/squid/squid.conf
Code:
cache_peer IP_Adresse_des_uebergeordneten_Proxies parent 80 80 no-query

auth_param ntlm program /usr/bin/ntlm_auth --domain="HKVV" --helper-protocol=squid-2.5-ntlmssp
auth_param ntlm children 7
auth_param ntlm max_challenge_reuses 0
auth_param ntlm max_challenge_lifetime 2 minutes
auth_param basic program /usr/bin/ntlm_auth --domain="HKVV" --helper-protocol=squid-2.5-basic
auth_param basic children 7
auth_param basic realm SQUID-PROXY
auth_param basic credentialsttl 2 hours

external_acl_type NT %LOGIN /usr/sbin/wbinfo_group.pl

acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1/255.255.255.255

acl inet_test external NT SQUID-User
acl dom proxy_auth REQUIRED

http_access allow dom inet_test

http_access deny all

4. Abschlussarbeiten:
Zum Schluss habe ich nochmal alles gestartet:

Code:
rcsmb restart
rcnmb restart
rcwinbind restart
rcsquid restart

Der Internetexplorer liefert mir "Server nicht gefunden".

/var/log/squid/access.log:
Code:
1177593698.338      1 10.176.187.4 TCP_DENIED/407 1775 GET http://www.google.de/ - NONE/- text/html
1177593698.347      3 10.176.187.4 TCP_DENIED/407 1798 GET http://www.google.de/ - NONE/- text/html
/var/log/squid/cache.log
Code:
2007/04/26 15:21:01| storeDirWriteCleanLogs: Starting...
2007/04/26 15:21:02|   Finished.  Wrote 1348 entries.
2007/04/26 15:21:02|   Took 0.0 seconds (224180.9 entries/sec).
2007/04/26 15:21:02| logfileRotate: /var/log/squid/store.log
2007/04/26 15:21:02| logfileRotate: /var/log/squid/access.log
2007/04/26 15:21:02| helperStatefulOpenServers: Starting 7 'ntlm_auth' processes
2007/04/26 15:21:03| helperOpenServers: Starting 7 'ntlm_auth' processes
2007/04/26 15:21:03| helperOpenServers: Starting 5 'wbinfo_group.pl' processes
2007/04/26 15:21:09| Reconfiguring Squid Cache (version 2.5.STABLE5)...
2007/04/26 15:21:09| FD 31 Closing HTTP connection
2007/04/26 15:21:09| FD 32 Closing ICP connection
2007/04/26 15:21:09| FD 33 Closing SNMP socket
2007/04/26 15:21:09| User-Agent logging is disabled.
2007/04/26 15:21:09| Referer logging is disabled.
2007/04/26 15:21:09| DNS Socket created at 0.0.0.0, port 32787, FD 7
2007/04/26 15:21:09| Adding nameserver 10.176.182.1 from /etc/resolv.conf
2007/04/26 15:21:09| Adding nameserver 10.176.182.21 from /etc/resolv.conf
2007/04/26 15:21:09| helperStatefulOpenServers: Starting 7 'ntlm_auth' processes
2007/04/26 15:21:11| helperOpenServers: Starting 7 'ntlm_auth' processes
2007/04/26 15:21:11| helperOpenServers: Starting 5 'wbinfo_group.pl' processes
2007/04/26 15:21:12| Accepting HTTP connections at 0.0.0.0, port 3128, FD 8.
2007/04/26 15:21:12| Accepting ICP messages at 0.0.0.0, port 3130, FD 30.
2007/04/26 15:21:12| HTCP Disabled.
2007/04/26 15:21:12| Accepting SNMP messages on port 3401, FD 31.
2007/04/26 15:21:12| WCCP Disabled.
2007/04/26 15:21:12| Configuring Parent 141.90.6.32/80/80
2007/04/26 15:21:12| Loaded Icons.
2007/04/26 15:21:12| Ready to serve requests.
/var/log/squid/store.log
Code:
1177593698.338 RELEASE -1 FFFFFFFF 2F4DF3B6B4DAFBC2C0C1B5E529C05828  407 1177593698         0 1177593698 text/html 1319/1650 GET http://www.google.de/
1177593698.347 RELEASE -1 FFFFFFFF FDD5BDFA1ADD46B57FB1C6DF6C531256  407 1177593698         0 1177593698 text/html 1319/1668 GET http://www.google.de/
Weitere Hinweise:

kinit username@domainname
hatte bei ersten Versuchen geliefert:
kinit: NOTICE: ticket renewable lifetime is 1 week
Nun ist das Ergebnis
kinit: krb5_get_init_creds: unable to reach any KDC in realm domainname
Keine Ahnung, was da nun falsch läuft.

Aufruf von
/usr/sbin/wbinfo_group.pl
liefert zunächst nichts (wartet auf eine Eingabe).
Wenn ich dann z.B. einen Benutzernamen eingebe, kommt:
Use of uninitialized value in concatenation (.) or string at /usr/sbin/wbinfo_group.pl line 35, <STDIN> line 1.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/wbinfo_group.pl line 39, <STDIN> line 1.
ERR

Liegt es nun am Squid, an Kerberos oder an Samba?
Oder müssen die Kollegen vom Active Directory noch etwas einstellen?
Wer hat eine Idee?

Danke schon mal.
Olaf
 
Oben