Oct 6

[原]再次处理cups 1.2.4打印问题 阴

linuxing , 17:27 , 网络服务 » 常见服务 , 评论(0) , 引用(0) , 阅读(22339) , Via 本站原创 | |
   年初的时候,在Asianux 3.0上尝试配置cups 1.2.4打印服务,遇到不少问题。见这里:[原]cups的windows-ext client-error-bad-request 故障 。这天,由于工作需要,再次处理cups 1.2.4。莫名其妙的是,这次同样的故障居然只处理一次,所以,特留下配置文件待以后参考。

一、关于使用SSL连接
由于只在局域网内使用,而且使用的人员不多,就没有考虑SSL加密链接,并把其禁用掉了。
但一直觉得奇怪,为什么使用http://ip:631/访问正常,使用https://ip:631/访问就没有响应呢?根据cups提供的升级说明,1.2.4版本应该是支持自动识别加密或非加密连接的。
查看日志文件:/var/log/cups/error.log,发现,如果访问https://ip:631/,就会有如下提示:
引用
I [06/Oct/2008:17:03:16 +0800] Generating SSL server key...

决定等待试试,一直等。。。。等了5分钟后,终于出现:
引用
I [06/Oct/2008:17:08:13 +0800] Created SSL server key file "/etc/cups/ssl/server.key"...
I [06/Oct/2008:17:08:13 +0800] Generating self-signed SSL certificate...
I [06/Oct/2008:17:08:13 +0800] Created SSL server certificate file "/etc/cups/ssl/server.crt"...
I [06/Oct/2008:17:08:13 +0800] cupsdCloseClient: SSL shutdown successful!
I [06/Oct/2008:17:08:47 +0800] cupsdCloseClient: SSL shutdown successful!
I [06/Oct/2008:17:08:47 +0800] Started "/usr/lib/cups/cgi-bin/printers.cgi" (pid=16245)

原来是我耐性不够,cups在后台使用cgi程序会自动生成SSL证书的。
(这时候,用top也没发现相关的运行进程,故原以为浏览器已经停止响应了)

二、解决windows-ext client-error-bad-request故障
这故障没仔细研究如何解决的,仅知道现在已经可以正常通过Windows连接到cups上,并正常打印。
贴出配置文件:
引用
#
# "$Id: cupsd.conf.in 5454 2006-04-23 21:46:38Z mike $"
#
#   Sample configuration file for the Common UNIX Printing System (CUPS)
#   scheduler.  See "man cupsd.conf" for a complete description of this
#   file.
#
MaxLogSize 2000000000

# Log general information in error_log - change "info" to "debug" for
# troubleshooting...
LogLevel info

# Administrator user group...
SystemGroup sys root

# Only listen for connections from the local machine.
Listen localhost:631
Listen 192.168.228.155:631
Listen /var/run/cups/cups.sock

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
# (Change '@LOCAL' to 'ALL' if using directed broadcasts from another subnet.)
#BrowseAllow @LOCAL
BrowseAllow @ALL

# Default authentication type, when authentication is required...
DefaultAuthType Basic

# Restrict access to the server...

 Order allow,deny
 Allow localhost
 Allow 192.168.228.*


# Restrict access to the admin pages...

 Encryption Required
 Order allow,deny
 Allow localhost
 Allow 192.168.228.*


# Restrict access to configuration files...

 AuthType Basic
 Require user @SYSTEM
 Order allow,deny
 Allow localhost
 Allow 192.168.228.*


# Set the default printer/job policies...

 # Job-related operations must be done by the owner or an adminstrator...
 
   Require user @OWNER @SYSTEM @ALL
   Order deny,allow
 


 # All administration operations require an adminstrator to authenticate...
 
   AuthType Basic
   Require user @SYSTEM
   Order deny,allow
 


 # Only the owner or an administrator can cancel or authenticate a job...
 
   Require user @OWNER @SYSTEM
   Order deny,allow
 


 
   Order deny,allow
 



#
# End of "$Id: cupsd.conf.in 5454 2006-04-23 21:46:38Z mike $".
#

(红色标记是我修改或增加的地方)

使用界面:
点击在新窗口中浏览此图片

三、配置文件及SSL证书
留个存档吧:

(文件路径在:/etc/cups/)
Tags:
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]