LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 742|回复: 4

关于squid认证的问题,自己加的密码不能通过认证

[复制链接]
发表于 2005-2-6 23:51:36 | 显示全部楼层 |阅读模式
我在RH9.0下设置squid代理上网,没有设置认证的时候一切正常,设置了认证后,不论访问什么网站,输入我设置的用户名和密码不能通过验证,总是出现如下提示:

  1. ERROR
  2. Cache Access Denied

  3. --------------------------------------------------------------------------------

  4. While trying to retrieve the URL: [url]http://www.google.com/[/url]

  5. The following error was encountered:

  6. Cache Access Denied.

  7. Sorry, you are not currently allowed to request:

  8.     [url]http://www.google.com/from[/url] this cache until you have authenticated yourself.

  9. You need to use Netscape version 2.0 or greater, or Microsoft Internet Explorer 3.0, or an HTTP/1.1 compliant browser for this to work. Please contact the cache administrator if you have difficulties authenticating yourself or change your default password.



  10. --------------------------------------------------------------------------------

  11. Generated Sun, 06 Feb 2005 15:40:35 GMT by dns (squid/2.5.STABLE1
复制代码



我的脚本为:


  1. icp_port 0
  2. cache_store_log none
  3. cache_access_log /dev/null
  4. cache_log /dev/null
  5. cache_effective_user squid
  6. cache_effective_group squid
  7. http_port 192.168.1.1:3128
  8. cache_mem 64 MB
  9. cache_dir ufs /cache 4096 32 256
  10. cache_swap_low 80
  11. cache_swap_high 100
  12. maximum_object_size 4096 KB
  13. maximum_object_size_in_memory 8 KB
  14. ipcache_size 1024
  15. ipcache_low 90
  16. ipcache_high 95
  17. client_netmask 255.255.255.255
  18. visible_hostname dns
  19. cache_mgr tianfuming
  20. auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd
  21. auth_param basic children 5

  22. auth_param basic realm My Proxy Caching Domain
  23. auth_param basic credentialsttl 2 hours
  24. acl mynet proxy_auth REQUIRED
  25. acl advance src  192.168.1.20 192.168.1.60 192.168.1.59
  26. acl all src 0.0.0.0/0.0.0.0
  27. acl download urlpath_regex -i \.mp3$ \.exe$ \.avi$ \.rar$ \.rvmb$ \.jpg  #½ûÖ¹ÏÂÔØ
  28. acl conncount maxconn 5               #×î´óÁ¬½ÓÊý
  29. acl qq dstdomain www.sina.com.cn
  30. acl badwords url_regex sex
  31. acl worktime time 8:00-18:00
  32. acl daytime time MTWHF
  33. http_access allow advance
  34. http_access deny mynet conncount
  35. http_access deny mynet download
  36. http_access deny mynet badwords
  37. http_access deny mynet qq
  38. http_access deny mynet daytime worktime
  39. http_access allow mynet
  40. httpd_accel_host virtual
  41. httpd_accel_port 80
  42. httpd_accel_with_proxy on
  43. httpd_accel_uses_host_header on
复制代码

哪个仁兄能帮我啊,我的QQ:153647452
发表于 2005-2-15 10:31:15 | 显示全部楼层
请原谅,我说最好先检查有否一些低级错误。例如啊你是怎样加密码的。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-2-18 13:27:34 | 显示全部楼层
我是这样加密码的
htpasswd -c -b /etc/httpd/conf/passwd client 123
这样又问题吗?
我这样加过也不行啊
htpasswd -c /etc/httpd/conf/passwd client
然后提示输入密码:
我输了两便也不行,怎么办呢:
回复 支持 反对

使用道具 举报

发表于 2005-2-18 22:53:23 | 显示全部楼层
Post by tianfuming
我是这样加密码的
htpasswd -c -b /etc/httpd/conf/passwd client 123
这样又问题吗?
我这样加过也不行啊
htpasswd -c /etc/httpd/conf/passwd client
然后提示输入密码:
我输了两便也不行,怎么办呢:



你这是设置的apache的认证密码啊?
而且-c加上的话是新建,你以前添加的用户和密码也会清空。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-2-19 19:15:59 | 显示全部楼层
我虽然是用apache的密码程序加的帐号和密码,但是却是用squid认证程序来验证,难道/usr/lib/squid/ncsa_auth /etc/squid/passwd不能验证这样加的密码吗?
那依照楼上各个仁兄看,改怎么正确的设置squid认证程序和密码呢?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表