[問題]分享印表機到win

歡迎提問 debian desktop 相關問題,何謂 desktop ? 舉凡您日常生活會用到的部份,如上網 ( www 、 bbs ..) 、程式設計、繪圖...等等。 通常以 X Window 環境底下問題為主。

[問題]分享印表機到win

文章sppmg » 週三 5月 02, 2007 9:29 pm

嘿嘿!最近安裝學校的電腦問題一堆,不好意思! :ooops:

我前幾個小時終於可以在Linux下列印了,可是在參考vbird的網頁後,samba還是弄不出來。
一度可以在win上連上印表機,但顯示「拒絕存取」
而現在則是在我這個電腦的目錄(搜尋ip得出的分享目錄)找不到印表機。

我目前希望能印即可,所以設定檔中只有允許一台電腦的ip。也沒設密碼。只分享印表機。
下面附上我的設定檔,希望各位高手給予指教,謝謝! :mrgreen:

cupsd.conf
代碼: 選擇全部
#
#
#   Sample configuration file for the Common UNIX Printing System (CUPS)
#   scheduler.  See "man cupsd.conf" for a complete description of this
#   file.
#

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

# Administrator user group...
SystemGroup lpadmin

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

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow @LOCAL

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

# Restrict access to the server...
<Location />
  Order allow,deny
  Deny From All
  Allow From 127.0.0.1
  Allow From 163.14.165.110
</Location>

# Restrict access to the admin pages...
<Location /admin>
  Encryption Required
  Order allow,deny
  Deny From All
  Allow 127.0.0.1
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Basic
  Require user @SYSTEM
  Order allow,deny
  Allow localhost
</Location>

# Set the default printer/job policies...
<Policy default>
  # Job-related operations must be done by the owner or an adminstrator...
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  # All administration operations require an adminstrator to authenticate...
  <Limit Pause-Printer Resume-Printer Set-Printer-Attributes Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Add-Printer CUPS-Delete-Printer CUPS-Add-Class CUPS-Delete-Class CUPS-Accept-Jobs CUPS-Reject-Jobs CUPS-Set-Default>
    AuthType Basic
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

#
#

#
# Printcap: the name of the printcap file.  Default is /etc/printcap.
# Leave blank to disable printcap file generation.
#

Printcap /var/run/cups/printcap

#
# PrintcapFormat: the format of the printcap file, currently either
# BSD or Solaris.  The default is "BSD".
#

#PrintcapFormat BSD
#PrintcapFormat Solaris

#
# PrintcapGUI: the name of the GUI options panel program to associate
# with print queues under IRIX.  The default is "/usr/bin/glpoptions"
# from ESP Print Pro.
#
# This option is only used under IRIX; the options panel program
# must accept the "-d printer" and "-o options" options and write
# the selected printer options back to stdout on completion.
#

#PrintcapGUI /usr/bin/glpoptions
Listen 0.0.0.0:631

smb.conf
代碼: 選擇全部
[global]
netbios name = Samba24
server string =I am scum303l
workgroup = WORKGROUP
security = share
hosts allow = 127. 163.14.165.110
interfaces =lo eth0
#bind interfaces only = yes
remote announce = 163.14.165.110
remote browse sync = 163.14.165.110
printcap name = /etc/gsambad/printcap
load printers = yes
cups options = raw
printing = cups
nix charset = utf8
display charset = utf8
dos charset = cp950
guest account = smbguest
guest ok = yes
log file = /usr/var/log/samba/samba.log
max log size = 1000
null passwords = no
username level = 8
password level = 8
encrypt passwords = yes
unix password sync = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
local master = no
domain master = no
preferred master = no
domain logons = no
os level = 33
logon drive = m:
logon home = \\%L\homes\%u
logon path = \\%L\profiles\%u
logon script = %G.bat
time server = no
name resolve order = wins lmhosts bcast
wins support = no
wins server =
wins proxy = no
dns proxy = no
preserve case = no
client use spnego = no
client signing = no
client schannel = no
server signing = no
server schannel = no
nt pipe support = yes
nt status support = yes
allow trusted domains = no
obey pam restrictions = yes
enable spoolss = yes
client plaintext auth = no
disable netbios = no
follow symlinks = no
update encrypted = yes
pam password change = no
passwd chat timeout = 120
hostname lookups = no
username map = /etc/gsambad/samba/smbusers
smb passwd file = /etc/gsambad/samba/smbpasswd
passwd program = /usr/bin/passwd '%u'
passwd chat = *New*password* %n\n *ReType*new*password* %n\n *passwd*changed*\n
add user script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null '%u'
add user to group script=/usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null -g '%g' '%u'
add group script = /usr/sbin/groupadd '%g'
delete user script = /usr/sbin/userdel '%u'
delete user from group script = /usr/sbin/userdel '%u' '%g'
delete group script = /usr/sbin/groupdel '%g'
add machine script = /usr/sbin/useradd -d /dev/null -g sambamachines -c 'Samba Machine Account' -s /dev/null -M '%u'
machine password timeout = 120
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
template shell = /dev/null
winbind use default domain = yes
winbind separator = @
winbind cache time = 360
winbind trusted domains only = yes
winbind nested groups = no
winbind nss info = no
winbind refresh tickets = no
winbind offline logon = no

[homes]
comment = Home Directories
path = /home
read only = no
available = yes
browseable = yes
writable = yes
guest ok = no
public = no
printable = no
share modes = no
locking = no

[netlogon]
comment = Network Logon Service
path = /home/netlogon
read only = no
available = yes
browseable = yes
writable = no
guest ok = no
public = no
printable = no
share modes = no
locking = no

[profiles]
comment = User Profiles
path = /usr/var/samba/profiles
read only = no
available = yes
browseable = no
writable = yes
guest ok = no
public = no
printable = no
locking = no
create mode = 0600
directory mask = 0700

[printers]
comment = All Printers
path = /usr/var/spool/samba
browseable = yes
writable = no
guest ok = yes
public = yes
printable = yes
share modes = yes
locking = no
valid users =student

[pdf-documents]
path = /home/pdf-documents
comment = Converted PDF Documents
available = yes
browseable = yes
writeable = yes
guest ok = yes

[pdf-printer]
path = /tmp
comment = PDF Printer Service
printable = yes
guest ok = yes
use client driver = yes
printing = bsd
print command = /usr/bin/gsambadpdf %s %u
lpq command =
lprm command =
系統的威力來自於程式的相互關係, 而非來自程式本身
is the idea that the power of a system comes more from the relationships among programs than from the programs themselves.

(英文語法怪怪的......誰能提供完整的版本?)
sppmg
活潑的高中生
活潑的高中生
 
文章: 317
註冊時間: 週五 8月 04, 2006 3:47 pm
來自: 臺灣

文章jackylu » 週六 5月 05, 2007 10:12 pm

請參考
http://cha.homeip.net/blog/archives/2005/08/_linux_samba_cu.html
我用這個無往不利.很容易操作一般來說pdf printer可以不用裝.而類unix(含linux,mac osx等)只要用cups就超好用.只是記得cupsd要記得權限有設好[/url]
jackylu
可愛的小學生
可愛的小學生
 
文章: 8
註冊時間: 週二 1月 25, 2005 6:40 pm

文章sppmg » 週四 5月 10, 2007 2:54 pm

今天又去試了。
找出為何印表機顯示不出的原因了,因為我的printcap name = /etc/gsambad/printcap 而非cups。
但是我後來又改了一下valid users =%S但還是權限不足無法存取。 :(
系統的威力來自於程式的相互關係, 而非來自程式本身
is the idea that the power of a system comes more from the relationships among programs than from the programs themselves.

(英文語法怪怪的......誰能提供完整的版本?)
sppmg
活潑的高中生
活潑的高中生
 
文章: 317
註冊時間: 週五 8月 04, 2006 3:47 pm
來自: 臺灣

文章sppmg » 週五 5月 11, 2007 1:19 pm

:-D :-D :-D
感謝!
我找出原因了。
就差在
use client driver = yes
加上去後就可以用了。
否則win會顯示「權限不足,無法存取」
系統的威力來自於程式的相互關係, 而非來自程式本身
is the idea that the power of a system comes more from the relationships among programs than from the programs themselves.

(英文語法怪怪的......誰能提供完整的版本?)
sppmg
活潑的高中生
活潑的高中生
 
文章: 317
註冊時間: 週五 8月 04, 2006 3:47 pm
來自: 臺灣

文章sppmg » 週五 5月 11, 2007 5:37 pm

請問一下
我現在用word印東西大約要一分鐘才開始印。
為什麼會這樣呢?
能改進嗎?
:-?
系統的威力來自於程式的相互關係, 而非來自程式本身
is the idea that the power of a system comes more from the relationships among programs than from the programs themselves.

(英文語法怪怪的......誰能提供完整的版本?)
sppmg
活潑的高中生
活潑的高中生
 
文章: 317
註冊時間: 週五 8月 04, 2006 3:47 pm
來自: 臺灣


回到 debian desktop

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 1 位訪客