network-samba-print-to-linux.html

来自「学习linux的工具书」· HTML 代码 · 共 85 行

HTML
85
字号
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
   <meta name="Author" content="Edward Fu">
   <meta name="GENERATOR" content="Mozilla/4.05 [zh-CN] (X11; I; Linux 2.1.127 i686) [Netscape]">
   <title>Freesoft Linux FAQ -- 共享Linux上打印机的问题</title>
</head>
<body>
My samba can shares the directory
when getting rid
<br>of the comment symbols before [public] item.
<p>And my linux box can print normally.
<p>But I can't print in my win95. I do can see the printer
<br>named 'epson' I set. And when I su to nobody, it can
<br>print normally too.
<p>What can I do the next setp?
<p>Here are my config files:
<p>[printcap]
<p>lp|epson:\
<br>:lp=/dev/lp1:\
<br>:sd=/var/spool/lpd/lp
<br>:lo=/var/spool/lpd/lock
<br>:sh
<p>[smb.conf]
<p>; /etc/smb.conf
<br>;
<br>; Make sure and restart the server after making changes to this file,
ex:
<br>; /etc/rc.d/init.d/smb stop
<br>; /etc/rc.d/init.d/smb start
<br>[global]
<br>&nbsp;&nbsp;&nbsp; guest account = nobody
<br>&nbsp;&nbsp;&nbsp; guest ok = yes
<br>&nbsp;&nbsp;&nbsp; workgroup = 3lab
<br>&nbsp;&nbsp;&nbsp; comment = linux host at room 507
<br>&nbsp;&nbsp;&nbsp; printing = bsd
<br>&nbsp;&nbsp;&nbsp; printcap name = /etc/printcap
<br>&nbsp;&nbsp;&nbsp; load printers = yes
<br>&nbsp;&nbsp;&nbsp; share modes = yes
<br>&nbsp;&nbsp;&nbsp; log file = /var/log/samba/log.%m
<br>&nbsp;&nbsp;&nbsp; lock directory = /var/lock/samba
<p>[homes]
<br>&nbsp;&nbsp;&nbsp; comment = home on linux host at 507
<br>&nbsp;&nbsp;&nbsp; browseable = no
<br>&nbsp;&nbsp;&nbsp; read only = no
<br>&nbsp;&nbsp;&nbsp; create mode = 0750
<br>[public]
<br>&nbsp;&nbsp;&nbsp; comment = public on linux host at 507
<br>&nbsp;&nbsp;&nbsp; path = /home/ftp/pub
<br>&nbsp;&nbsp;&nbsp; public = yes
<br>&nbsp;&nbsp;&nbsp; writable = no
<br>&nbsp;&nbsp;&nbsp; printable = no
<br>;[printers]
<br>&nbsp;&nbsp;&nbsp; ;comment = printers on linux hos at 507
<br>&nbsp;&nbsp;&nbsp; ;security = server
<br>&nbsp;&nbsp;&nbsp; ;path = /var/spool/lpd/lp
<br>&nbsp;&nbsp;&nbsp; ;browseable = no
<br>&nbsp;&nbsp;&nbsp; ;public = no
<br>&nbsp;&nbsp;&nbsp; ;printable = yes
<br>&nbsp;&nbsp;&nbsp; ;writable = no
<br>&nbsp;&nbsp;&nbsp; ;create mode = 0700
<br>[epson]
<br>&nbsp;&nbsp;&nbsp; comment = epson 1600k on linux host at 507
<br>&nbsp;&nbsp;&nbsp; path = /var/spool/lpd/lp
<br>&nbsp;&nbsp;&nbsp; browseable = yes
<br>&nbsp;&nbsp;&nbsp; printer name = lp
<br>&nbsp;&nbsp;&nbsp; writable = no
<br>&nbsp;&nbsp;&nbsp; public = yes
<br>&nbsp;&nbsp;&nbsp; printable = yes
<p>Yours,
<br>Chen Yaoming
<br>&nbsp;
<p>I found it was very simple.
<p>I changed the access right of /var/spool/lpd/lp
<br>to 777, then the remote printing is all right.
<p>Additional question is why I could still print
<br>on local host when I sued to nobody before I
<br>changed the access right.
<p>Chen Yaoming
<br>&nbsp;
<br>&nbsp;
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?