�������: ������ (���� | �����������) ��RU opennet.me  
The OpenNET Project / Index page

[ ������� /+++ | ����� | ���� | ]

������� ������������ / ������ "������������ ��� Linux" / ���������� ���������
next up previous contents index
Next: ������ � �������� Windows Up: Samba Previous: ������ � SMB-�������� ��   Contents   Index

������ � �������� Linux ��� Windows-�����

��� ����������� ������� � Linux-�������� �� Windows-�����, ��� ���������� ���������, ��� ������� �������� � ��� Linux. ���� �� ������ �������� �� ��� Linux, �� ����������� ������� � �������� ����� ����� �������.

��������, ��� ��� ������ ������������ Windows ������ ���� ���������������� �� ������� Linux/Samba. Windows 95/98 ����� �������� ������������������� �� ������� ������ � ���� ������ � �������, ������� �������������� ��� ``�����'' �� ������ Windows ��� ������, ��� ���� �� ������ �� Cancel (������) ��� ``�����'' � Windows, �� �� ������� �� ��������, �� ������������ � SMB ��������. Windows NT ��������� ����� ���������� �������� ��� � ������ ��� ����������� � ��������.

�������� ��������������� ������� ������ ��� �������� �������� ������.

�������� ��������� �������� � ���� smb.conf:

[global]
   printing = bsd
   printcap name = /etc/printcap
   load printers = yes
   log file = /var/log/samba-log.%m
   lock directory = /var/lock/samba
[printers]
   comment = All Printers
   security = server
   path = /var/spool/lpd/lp
   browseable = no
   printable = yes
   public = yes
   writable = no
   create mode = 0700
[ljet]
   security = server
   path = /var/spool/lpd/lp
   printer name = lp
   writable = yes
   public = yes
   printable = yes
   print command = lpr -r -h -P %p %s

���������, ��� ���� � �������� (� ���� ������ ��� [ljet]) ������������� ��������� ����������, ���������� � ����� /etc/printcap.

������:

   printcap name = /etc/printcap
   load printers = yes

������������, ������ �� ��� ��������, ������������� � /etc/printcap �� ��������� ���� ���������. ���� �� ������� ��������� ������, �� ��� ������������� � ��������� ������� �������� �� �����������. ������ [printers] �������� ��������� ��� ���������, ������� �� ������ ���������� ����. ���� ������������ ���������� ������ �� �������� �������� ������� (BSD), �� ���������� ��������� ``���������'' ���� printcap (��� ����������� print command, �������� ����). �������������� ���������� � ������� printcap ���������� � ����� ������.

�������� ������� ��� �������� ������� ���������� �������� ����������� ������� ������:

   print command = cp %S /tmp/print.%P.%S
\emd{verbatim}

�������� ���� ����� ���� ���������������.

���������� ��������� �������� � �������� � ��������� UNIX-����� ��
����� Windows NT � �������������� Samba. ���� �� ������� ������� �
���, ��� NT ����� ����������� ������ ������� �������. ��� �������
���� ��������, �������� ��������� � ����� \verb|docs/WinNT.txt|
������������ Samba. ������ �������� ������� � ��������. ��������
����������� � ��� �� ����� �����.

����� ������� ��� ������������� ������� ������, ��� �
��������������� �������:

\begin{verbatim}
print command = smb2ps %s | lpr -r -h -P %p

��� smb2ps �������� ��������, ������� ����������� �������� ����, ���������� �� Windows, � ������ ������������ ���� Postscript. �� ����� ������ ������� ������ ��� � ��������� ��� ������, ������ ��� ��� ������ �������� ��������� ���� PJL ��� PCL (���� ���������� PCL, � �� ��������� Postscript). Windows 95/98/NT �� ����� ������ �������� Postscript, �� ������� �������� Digital turbo Printserver 20 ����� �������� ��� ������� ������� Postscript � ����������� �������. ���������� ����� �������� � ������� Apple LaserWriter II NTX.

���� �� ������� �������� ������� ��� ������, �� ������ ����������� � ������� �������. ����� ����� ������� � ��������� �������� (� ����� ������ ���, /var/spool/lpd/lpr) ������� ������� 4755 (��������, ��� ���������� SUID-���). ��� ������� �������� ��� ��������� ��������� ���������������; ���� ������������ ������ �������� ��������� ������, �� ����� ������������ �� ������ ��������.

������� � ������� ������� �� ������ � ���������� /var/spool/lpd/ ����� ���� ��������� ��� �������������� ����-�� ��������� path=/tmp � print command = lpr -r -P%p %s.

������ ��������� ������ ������� Postscript ��� ������ �� ������ ��� Windows, ������� �������� ������ ������ ������� � ����� ������� �������. ��������� �������� ������ ����� ��������� ��������� %%[ Lastpage ]%% � ���������. ���� �� �������� ��������� ���� ������ - ������������� ������� ��� �������� ����� ������� Postscript �� ������� ������. ������ ��������� �������� ���������� ������� �������� Postscript ��� Windows. ��������, ������ ������ ������� � ������������� LPRng ������ Postscript ��� ������ �� ������ Samba. �� ������� Samba, ������ � /etc/printcap ������ ����� ��������� �������� ���:

raw:\
        :rw:sh:
        :lp=/dev/lp1
        :sd=/var/spool/lpd/raw
        :fx=flp

LPRng �� ������� :\ � ����� ������ ������. ������ � �������� ��� ����� ���������� ������� � ����� /etc/smb.conf - ��� ����������� ��������. ������ ������� ������ ����� ��� ������������� ������ raw �� ����� /etc/printcap, ������ ������ ���������� � �������� �����. ���������� ������ ��������� ������:

   print command = lpr -b -Praw %s

��� ����� ����� ������������ ���������� ����������� ������ � Windows - ��� ������ ����� �� �������, ������ ������������� ������ �� �������.

���� ��� ������ ��������� ��������� ������ �������� � ����� ������� Windows-��������, �� ���������� �������� ��������� sf � ���� /etc/printcap, ��� �������� ������ �������, ����������� �������, �� �� ����� ������ �� ������ ������� ������ ����������.



Alex Otwagin 2002-12-16



������:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
�������:

�������� �� �����
���������� �� ���������
Created 1996-2026 by Maxim Chirkov
��������, ����������, ����������