Chinaunix

标题: 与Windows AD实现透明验证的squid代理服务器 [打印本页]

作者: ahocat    时间: 2009-06-02 14:58
标题: 与Windows AD实现透明验证的squid代理服务器
在FreeBSD上搭建了一台squid代理服务器,与Windows 2003域实现透明的用户验证。也就是说,客户端如果以域用户登录的话,可以直接通过代理上网浏览;如果非域用户的话,则必须输入域用户密码后方可上网。
网上虽然有这方面的介绍,但可能环境各不相同,所以不一定适用。我也是摸索了好几天才搞成功的,有些地方还是一知半解,将来慢慢研究。先把整个安装配置过程写下来,供需要的人多一种参考。
操作系统是FreeBSD 7.2版。主机名是bsd1.abc.com;Kerberos5和OpenLDAP是必须的;其他好像没什么要求。
Windows域名为abc.com,NetBIOS名是ABC

一、配置Kerberos5
1. Kerberos5的配置文件是/etc/krb5.conf,内容如下:
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/lrb5kdc.log
admin_server = FILE:/var/log/kadmind.log


[libdefaults]
default_realm = ABC.COM
  # Windows域名,必须大写

# 如果FreeBSD所配置的是Windows域的DNS服务器,下面dns_lookup两项可以设为true,即自动通过DNS查询域控制器等信息;
# 否则设为false,通过后面[realm]段的配置设定域控制器等信息
dns_lookup_realm = false
dns_lookup_kdb = false


[realms]
ABC.COM = {
kdc = dc1.abc.com:88 dc2.abc.com:88   # 域控制器,可以写IP,多个dc之间以空格分开。如果前面的dns_lookup两项参数设为了true,则这个参数就不需要了。
default_domain = ABC.COM # Windows域名,必须大写
}


2. 用kinit验证一下kerberos配置是否成功。顺利的话输入命令得到结果如下:
bsd1# kinit administrator  (验证Windows域管理员administrator用户)
administrator@ABC.COM's Password:  (输入administrator的密码)
kinit: NOTICE: ticket renewable lifetime is 1 week (看见这一行的话,恭喜你,kerberos配置成功了)

二、安装配置Samba
我用的是3.3.4版,从Samba官方网站下载的源码包。——为什么不用FreeBSD自带的?——因为没搞定。

1. 解压源码包,编译安装。很简单,大家都会吧
bsd1# tar zxvf samba-3.3.4.tar.gz
bsd1# cd samba-3.3.4/source
bsd1# ./configure --with-ads --with-winbind  (--with-ads --with-winbind这两个参数是实现与Windows AD验证必须的)
bsd1# make
bsd1# make install


2. Samba安装完成,开始配置samba。FreeBSD下的samba配置文件是/usr/local/samba/lib/smb.conf。内容如下:
[global]
netbios name = BSD1
  # 本机在Windows网络中的NetBIOS名
workgroup = ABC   # Windows域的NetBIOS名
realm = ABC.COM   # 域名,与之前krb5.conf中的一致
server string = PROXY SERVER # 机器的说明信息,无关紧要
encrypt passwords = yes
security = ADS   # 使用AD验证
wins server = 192.168.0.10
# WINS服务器地址。根据网上资料,这个参数似乎不是必须的,但我之前一直搞不定,直到加上这条后才成功的。不明白……
password server = dc1.abc.com dc2.abc.com #域控制器,多台之间用空格分开
log level = 3
log file = /var/log/samba/%m.log
max log size = 50
dns proxy = NO
ldap ssl = NO
idmap uid = 10000-20000
idmap gid = 10000-20000
winbind use default domain = YES
# 启用winbind,这样才能实现透明的用户认证

3. Samba配置完成,依次启动nmbd、smbd、winbindd
bsd1# cd /usr/local/samba/sbin
bsd1# ./nmbd -D
bsd1# ./winbindd -D
bsd1# ./smbd -D


4. 将本机加入到Windows域
bsd1# /usr/local/samba/bin/net ads join -U administrator
需要输入administrator密码。如果成功的话就可以在Windows域管理工具中找到bsd1这个计算机帐户了。
在本机中则可用下列命令确认:
bsd1# /usr/local/samba/bin/wbinfo -t
checking the trust secret via RPC calls succeeded
(出现这句话就表明加入域成功了)
bsd1# /usr/local/samba/bin/wbinfo -u  (这条命令可以列出域中的用户帐户)

三、安装配置squid
我用的是2.7STABLE6版本,从squid官方网站下载的源码包。

1. 解压源码包,编译安装
bsd1# tar zxvf squid-2.7.STABLE6.tar.gz
bsd1# cd squid-2.7.STABLE6
bsd1# ./configure --enable-auth=basic,ntlm
(将basic和ntlm验证模块编译进来)
bsd1# make
bsd1# make install


2. 安装squid完成。squid的初始化配置略(可参阅彭勇华译的《Squid中文权威指南》,我都是照着这个指南做的,除了winbind验证的部分。squid从2.6版起不再带winbind模块了,而是直接使用samba的winbind)。
squid的配置文件是/usr/local/squid/etc/squid.conf,认证相关配置参数如下(其他参数略,请参阅《Squid中文权威指南》):

# 指定使用samba的ntlm验证模块
auth_param ntlm program /usr/local/samba/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp
auth_param ntlm children 20
auth_param basic program /usr/local/samba/bin/ntlm_auth --helper-protocol=squid-2.5-basic
auth_param basic children 10
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours

acl all src 0/0
acl NTLMUsers proxy_auth REQUIRED # 强制要求用户验证
http_access allow all NTLMUsers  
# 通过验证的用户则允许访问
http_access deny all  # 其他的均禁止访问

3. 启动squid
bsd1# /usr/local/squid/sbin/squid
好了,可以用客户端上网试试了。但是,失败。
用户上网就会跳出要求输入用户名密码的对话框,输入了却通不过验证。

检查log发现,是对/usr/local/samba/var/locks/winbindd_privileged没有访问权限,原来这个目录的owner是root,默认权限是750,而squid是以nobody权限运行的。
把权限改为777试试,还是不行,奇怪。改回到750,再把目录的owner改为nobody,然后重启squid。哈哈,这下成功了!
且慢高兴,重启服务器后发现又不行了,winbindd启动不了了,原来还是/usr/local/samba/var/locks/winbindd_privileged权限的问题。winbindd是以root权限启动的,而winbindd_privileged的owner已经改成了nobody。那就把所有者和所属组分别设为root和nobody:
# chown -R root:nobody /usr/local/samba/var/locks/winbindd_privileged

重新启动服务,这下总算好了。

[ 本帖最后由 ahocat 于 2009-11-26 16:39 编辑 ]
作者: xjjjk    时间: 2009-06-04 19:36
楼主的这个里面没有对用户分组,我是做了用户分组,我的问题是:
1:现在客户端ie设置了代理,打开ie上网时需要输入用户名和密码,使用正确的用户和密码可以认证通过;但是客户端的用户是使用域用户登录的客户端机器;
不是透明的,每次用户必须要输入域上的用户和密码验证才能上网;
squid.conf的配置
auth_param basic program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-basic
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 5 hour

auth_param ntlm program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp
auth_param ntlm children 5
auth_param ntlm keep_alive on

external_acl_type wingroup %LOGIN /usr/lib/squid/wbinfo_group.pl

acl ntpass external wingroup  wwwjtproxy wwwmjproxy
acl password  proxy_auth REQUIRED
http_access allow  ntpass password
作者: ahocat    时间: 2009-06-06 13:39
标题: 回复 #2 xjjjk 的帖子
还没试过对用户分组。
你如果不分组的话能够实现透明认证码?要是还不行的话也许问题是在samba/winbind的设置。net ads join的运行成功吗?wbinfo -t能够验证码?
作者: arone    时间: 2009-06-09 20:00
原帖由 xjjjk 于 2009-6-4 19:36 发表
楼主的这个里面没有对用户分组,我是做了用户分组,我的问题是:
1:现在客户端ie设置了代理,打开ie上网时需要输入用户名和密码,使用正确的用户和密码可以认证通过;但是客户端的用户是使用域用户登录的客户 ...


external_acl_type ldap_group ttl=0 children=50 %LOGIN \
        /usr/local/libexec/squid/squid_ldap_group -b \
        "ou=ABC,dc=abc,dc=com" -f \
        "(&(cn=%a)(member=%v)(objectClass=group))" -F "(|(samAccountName=%s)(cn=%s))" -h \
        192.168.0.53 -D ldap@abc.com -w password -v3 -S

acl Web_LDAP external ldap_group Web_User

http_access allow Web_LDAP

给你参考一下,ldap@abc.com为查询AD的帐号, Web_User组的用户允许访问。squid要是代理模式,透明代理的模式好像不支持,不知道新版的squid是否在透明代理上也支持了,还没试过。我在公司就是这么用的,代理近1000台机器的web访问。
作者: xjjjk    时间: 2009-06-11 10:50
谢谢arone指点,待会测试下;
作者: signmem    时间: 2009-06-11 21:57
这个问题是,  windows 电脑能够通过,  LINUX 电脑的 FIREFOX 无法通过...  

请问用 Linux 测试过吗? 我的 windows 没有问题,但 Linux 不可以
作者: ahocat    时间: 2009-06-12 08:56
原帖由 signmem 于 2009-6-11 21:57 发表
这个问题是,  windows 电脑能够通过,  LINUX 电脑的 FIREFOX 无法通过...  

请问用 Linux 测试过吗? 我的 windows 没有问题,但 Linux 不可以


linux没试过,OpenSolaris+FireFox是可以的(这个回帖就是用它发的),我想LINUX没理由不行吧?

输入的用户名前面需要加上域名,就像这样: domain\username
作者: xjjjk    时间: 2009-06-27 00:21
我这里的系统为debian 5.0,配置后出现以下错误
Jun 27 00:08:19 cache squid[1890]: Squid Parent: child process 2041 started
Jun 27 00:08:19 cache squid[2041]: The wbinfo_group_helper helpers are crashing too rapidly, need help!
Jun 27 00:08:19 cache squid[1890]: Squid Parent: child process 2041 exited due to signal 6
Jun 27 00:08:19 cache squid[1890]: Exiting due to repeated, frequent failures
^C

cache:~#
cache:~# net ads join -U administrator@cetr.net
Enter administrator@cetr.net's password:
[2009/06/27 00:13:29,  0] libads/kerberos.c:ads_kinit_password(356)
  kerberos_kinit_password administrator@cetr.net@CETR.NET failed: Malformed representation of principal
Failed to join domain: failed to connect to AD: Malformed representation of principal
cache:~#
是debian系统的问题吗;

[ 本帖最后由 xjjjk 于 2009-6-27 00:56 编辑 ]
作者: ahocat    时间: 2009-06-27 10:07
标题: 回复 #8 xjjjk 的帖子
加入域的这句命令中,把用户名后的域名后缀“@cetr.net”去掉,即:
cache:~# net ads join -U administrator
作者: xjjjk    时间: 2009-06-27 22:46
cache:~# net ads join -U administrator
Enter administrator's password:
[2009/06/27 22:37:12,  0] libads/kerberos.c:ads_kinit_password(356)
  kerberos_kinit_password markoradministrator@CETR.NET failed: Cannot resolve network address for KDC in requested realm
Failed to join domain: failed to connect to AD: Cannot resolve network address for KDC in requested realm
dns已经设置了看错误提示是DNS的问题;
作者: ahocat    时间: 2009-06-28 09:34
标题: 回复 #10 xjjjk 的帖子
必须指向Windows域中DC的DNS
另外,smb.conf中加上wins server,域中也要启用wins服务,DC要注册到wins。

[ 本帖最后由 ahocat 于 2009-6-28 09:44 编辑 ]
作者: xjjjk    时间: 2009-06-29 00:12
原帖由 ahocat 于 2009-6-28 09:34 发表
必须指向Windows域中DC的DNS
另外,smb.conf中加上wins server,域中也要启用wins服务,DC要注册到wins。

smb。conf中已经添加wins服务器的地址了,ping fqdn dc是没有问题的可以解析;
wbinfo -t也没有问题;
作者: ahocat    时间: 2009-06-29 08:43
标题: 回复 #12 xjjjk 的帖子
光能ping到DC不一定正确,加入域必须要能解析到你这个cetr.net域的SRV记录
作者: xjjjk    时间: 2009-06-29 12:21
原帖由 ahocat 于 2009-6-29 08:43 发表
光能ping到DC不一定正确,加入域必须要能解析到你这个cetr.net域的SRV记录

cache:/var/log/samba# host cetr.net
cetr.net             A       10.1.2.8
cetr.net             A       10.5.2.1
cetr.net             A       10.1.2.12
cetr.net             A       10.20.2.1
cetr.net             A       10.1.50.2
是可以正确解析srv记录的;

并且我在windows客户端通过nslookup也可以正确解析cetr.net的srv记录的;

下面是我的squid服务器的相关日志
log.smbd
[2009/06/29 00:10:55,  0] libads/kerberos.c:ads_kinit_password(356)
  kerberos_kinit_password CACHE$@CETR.NET failed: Cannot resolve network address for KDC in requested realm
[2009/06/29 00:10:55,  0] printing/nt_printing.c:nt_printing_init(664)
  nt_printing_init: error checking published printers: WERR_ACCESS_DENIED

***************************************************************************
log.cetr.net
[2009/06/27 00:17:01,  1] rpc_client/cli_pipe.c:cli_pipe_validate_current_pdu(62
4)
  cli_pipe_validate_current_pdu: RPC fault code DCERPC_FAULT_ACCESS_DENIED recei
ved from remote machine testad.cetr.net pipe \lsarpc fnum 0x4005!
[2009/06/27 00:17:01,  0] rpc_client/cli_pipe.c:cli_rpc_pipe_open_ntlmssp_intern
al(2367)
  cli_rpc_pipe_open_ntlmssp_internal: cli_rpc_pipe_bind failed with error NT cod
e 0x00000005
[2009/06/27 10:35:31,  1] libsmb/clikrb5.c:ads_krb5_mk_req(680)
  ads_krb5_mk_req: krb5_get_credentials failed for mkfserver$@CETR.NET (Reques
ted effective lifetime is negative or too short)
作者: ahocat    时间: 2009-06-29 13:43
标题: 回复 #14 xjjjk 的帖子
这里只看到DNS的主机(A)记录。
检查一下DNS服务器,cetr.net域下面有没有_msdcs这样的目录,这个目录下面应该包含有你域中DC,ldap,kerboros,site等很多信息

[ 本帖最后由 ahocat 于 2009-6-29 13:44 编辑 ]
作者: xjjjk    时间: 2009-06-29 15:07
原帖由 ahocat 于 2009-6-29 13:43 发表
这里只看到DNS的主机(A)记录。
检查一下DNS服务器,cetr.net域下面有没有_msdcs这样的目录,这个目录下面应该包含有你域中DC,ldap,kerboros,site等很多信息

dns服务器的记录都正常,可以加入域了,krb5.conf中的配置有点问题;
目前可以正常加入到域了,也可以通过wbinfo -t wbinfo -u看到域的信息了;
目前启动squid就出现以下错误;
Jun 29 13:50:02 cache squid[1954]: Squid Parent: child process 1957 started
Jun 29 13:50:03 cache squid[1957]: The wbinfo_group_helper helpers are crashing   too rapidly, need help!
Jun 29 13:50:03 cache squid[1954]: Squid Parent: child process 1957 exited due to signal 6un 29 13:50:06 cache squid[1954]: Squid Parent: child process 1984 started
Jun 29 13:50:06 cache squid[1984]: The wbinfo_group_helper helpers are crashing too rapidly, need help!
Jun 29 13:50:06 cache squid[1954]: Squid Parent: child process 1984 exited due to signal 6
Jun 29 13:50:09 cache squid[1954]: Squid Parent: child process 2009 started
Jun 29 13:50:10 cache squid[2009]: The wbinfo_group_helper helpers are crashing   too rapidly, need help!
Jun 29 13:50:10 cache squid[1954]: Squid Parent: child process 2009 exited due to signal 6
Jun 29 13:50:13 cache squid[1954]: Squid Parent: child process 2032 started
Jun 29 13:50:13 cache squid[2032]: The wbinfo_group_helper helpers are crashing  too rapidly, need help!
Jun 29 13:50:13 cache squid[1954]: Squid Parent: child process 2032 exited due to signal 6
Jun 29 13:50:16 cache squid[1954]: Squid Parent: child process 2055 started
Jun 29 13:50:17 cache squid[2055]: The wbinfo_group_helper helpers are crashing  too rapidly, need help!
Jun 29 13:50:17 cache squid[1954]: Squid Parent: child process 2055 exited due to signal 6
Jun 29 13:50:17 cache squid[1954]: Exiting due to repeated, frequent failures
作者: ahocat    时间: 2009-06-29 15:11
标题: 回复 #16 xjjjk 的帖子
看一下log.winbindd和cache.log
作者: xjjjk    时间: 2009-06-29 15:46
原帖由 ahocat 于 2009-6-29 15:11 发表
看一下log.winbindd和cache.log

log.winbindd
***************************************************************************
[2009/06/29 13:29:09,  0] winbindd/winbindd.c:main(1127)
  winbindd version 3.2.5 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2008
[2009/06/29 13:29:09,  0] winbindd/winbindd_cache.c:initialize_winbindd_cache(23
74)
  initialize_winbindd_cache: clearing cache and re-creating with version number
1
[2009/06/29 13:30:01,  1] libsmb/clikrb5.c:ads_krb5_mk_req(680)
  ads_krb5_mk_req: krb5_get_credentials failed for markorcw$@MARKORYY (Cannot fi
nd KDC for requested realm)
[2009/06/29 13:30:01,  1] libsmb/cliconnect.c:cli_session_setup_kerberos(626)
  cli_session_setup_kerberos: spnego_gen_negTokenTarg failed: Cannot find KDC fo
r requested realm
[2009/06/29 13:46:20,  0] winbindd/winbindd.c:main(1127)
  winbindd version 3.2.5 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2008
[2009/06/29 13:46:20,  0] winbindd/winbindd_cache.c:initialize_winbindd_cache(23
74)
  initialize_winbindd_cache: clearing cache and re-creating with version number
1

cache.log  应该是缺少perl相关的软件包,谢谢ahocat ,安装了perl后问题解决;
***************************************************************************
Can't locate Getopt/Std.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/
perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/lib/squid/wbinfo_group.pl l
ine 62.
BEGIN failed--compilation aborted at /usr/lib/squid/wbinfo_group.pl line 62.
Can't locate Getopt/Std.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/
perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/lib/squid/wbinfo_group.pl l
ine 62.
BEGIN failed--compilation aborted at /usr/lib/squid/wbinfo_group.pl line 62.
Can't locate Getopt/Std.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/
perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/lib/squid/wbinfo_group.pl l
ine 62.
BEGIN failed--compilation aborted at /usr/lib/squid/wbinfo_group.pl line 62.
Can't locate Getopt/Std.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/
perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/lib/squid/wbinfo_group.pl l
ine 62.
BEGIN failed--compilation aborted at /usr/lib/squid/wbinfo_group.pl line 62.
Can't locate Getopt/Std.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/
perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/lib/squid/wbinfo_group.pl l
ine 62.
BEGIN failed--compilation aborted at /usr/lib/squid/wbinfo_group.pl line 62.
cache:/var/log/squid# tail -f cache.log
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
        total space in arena:    2280 KB
        Ordinary blocks:         2271 KB      5 blks
        Small blocks:               0 KB      0 blks
        Holding blocks:           280 KB      1 blks
        Free Small blocks:          0 KB
        Free Ordinary blocks:       8 KB
        Total in use:            2551 KB 100%
        Total free:                 8 KB 0%

[ 本帖最后由 xjjjk 于 2009-6-29 15:58 编辑 ]
作者: xjjjk    时间: 2009-06-29 19:22
用户分组认证权限不同,但是新添加的用户要通过认证,必须要重启squid服务才能通过认证,不知道大家有没有遇到过这样的问题,测试过不重启squid服务,重启samba和winbind好像也不行;
作者: aleng    时间: 2009-07-10 14:34
一台win域控+一台winserver上装isa2006实现起来简单,问题少。
作者: jar7324    时间: 2009-07-12 22:11
提示: 作者被禁止或删除 内容自动屏蔽
作者: aleng    时间: 2009-07-13 18:34
原帖由 jar7324 于 2009-7-12 22:11 发表

isa和windows server都是要钱的,能省干嘛不省呢?
当然,用盗版的无所谓啦。



不需要掏钱,
1 你的域控win server 是买的么?是,那么 用这个软件和序号再装一台即可。
2 你的你的域控win server 是白来的 :wink: 那么  用这个软件和序号再装一台即可。

win 包含了krb5,和活动目录-域,那么装一个squid for win即可。就是代理服务器了,当然也可以用别的代理软件代替squid。
代理服务器软件,大把的有的是,我们关心的应该是    【代理的性能和效率】 没有必要 【总想着自己搭建】 【你看我会做,你看我多牛】

10年前你再牛能有发哥牛么?今天你再牛能有春哥牛么?

春哥纯爷们,铁血真汉子

[ 本帖最后由 aleng 于 2009-7-14 02:11 编辑 ]
作者: ahocat    时间: 2009-07-15 12:38
原帖由 aleng 于 2009-7-13 18:34 发表



不需要掏钱,
1 你的域控win server 是买的么?是,那么 用这个软件和序号再装一台即可。
2 你的你的域控win server 是白来的 :wink: 那么  用这个软件和序号再装一台即可。

win 包含了krb5,和活动 ...


不是所有的公司都允许用盗版软件的(包括只买了一个license装在好多台机器上这样的行为),我们公司就不行,因为每年都有外部机构的审查,软件license是首当其冲的。
作者: frank821    时间: 2009-07-28 08:20
原帖由 aleng 于 2009-7-13 18:34 发表



不需要掏钱,
1 你的域控win server 是买的么?是,那么 用这个软件和序号再装一台即可。
2 你的你的域控win server 是白来的 :wink: 那么  用这个软件和序号再装一台即可。

win 包含了krb5,和活动 ...



盗版还这么振振有词,见过无耻的,没见过这么无耻的...
用了就用了,低调点,别人也不会去说你,别到处装B,ok?

[ 本帖最后由 frank821 于 2009-7-28 08:22 编辑 ]
作者: skyhappy81    时间: 2009-07-31 09:03
AD用户组的控制己经实现,只是现在用代理上网的速度奇慢。每开一个网页都需要做一次身份认证,上个网急死个人。
是不是可以在哪里设定只需做一个认证的?
作者: xjjjk    时间: 2009-09-10 22:07
原帖由 skyhappy81 于 2009-7-31 09:03 发表
AD用户组的控制己经实现,只是现在用代理上网的速度奇慢。每开一个网页都需要做一次身份认证,上个网急死个人。
是不是可以在哪里设定只需做一个认证的?

squid默认认证是你不关闭第一次认证过的浏览器窗口,新开窗口是无需认证的,如果你关闭了第一次认证通过的窗口,再新开窗口,那是需要再次认证的;
作者: yoqao_lee    时间: 2009-09-24 18:50
我也是用这种方式的,已稳定远行一年了,所有加入域用户不需要输入用户名和密码可以直接上网,但是,非域用户上网时就需要输入用户名和密码了,但是输入的用户名需要以“doman\user”,这种方式输才能通过难证,直接输入用户名无法通过验证,不知道各位有没有遇到这种情况,有没有解决的方案?
作者: GrayChan    时间: 2009-09-24 19:44
提示: 作者被禁止或删除 内容自动屏蔽
作者: ahocat    时间: 2009-09-25 08:46
原帖由 yoqao_lee 于 2009-9-24 18:50 发表
我也是用这种方式的,已稳定远行一年了,所有加入域用户不需要输入用户名和密码可以直接上网,但是,非域用户上网时就需要输入用户名和密码了,但是输入的用户名需要以“doman\user”,这种方式输才能通过难证, ...


似乎编译的时候--enable-auth参数只启用ntlm,不启用basic就可以了,至少我现在就是这样的,用户名前不需要加域名了。
作者: GrayChan    时间: 2009-09-27 22:37
提示: 作者被禁止或删除 内容自动屏蔽
作者: vepeta    时间: 2009-11-12 11:52
cd squid-2.7.STABLE6.tar.gz
这里有个笔误哦 应该是cd squid-2.7.STABLE6
作者: 86509172    时间: 2010-01-04 17:37
标题: 回复 #27 yoqao_lee 的帖子
你可以将域用户放在一个组里,然后在squid.conf中定义这个组访问公网时同需要通过验证,而squid所在的这台电脑已经加入了DC中,所以不属于这个组的用户就需要输入用户名和密码。

也可以设置所用的用户(非域用户)都不需要输入用户名和密码就可以通过SQUID访问公网,squid工作在透明模式下:
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_users_host_header on
作者: strongert    时间: 2011-04-19 14:06
没用过,学习下




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2