2009-05-20

Печать с Windows на Linux

Значит так. Нужно с Windows XP или Windows 2000 печатать на принтера, установленные локально на линуксовой машине. Линукс у нас openSUSE 11.1.

1. Ну первым делом на линухе ставим cups, и samba, все что есть, не считая исходников и develop.
2. В YaST2 настраиваем принтер на общий доступ. Если все правильно настроено, то все окружающие тачки с линухой практически сразу его увидят и смогут на него печатать.


3. В YaST2 настраиваем samba. Там визард простой, разберетесь...
4. Потом в конфигах xinetd разрешаем работу SWAT.
5. Запускаем и ставим на автозапуск cups, smb, nmb, xinetd, winbind.
6. Заходим в SWAT (http://hostname_or_ip:901) и настраиваем там принтер.
7. Обращаем внимание на то, что имя принтера в CUPS и SAMBA д.б. одинаковое.
8. Ну и в консоли под root выполняем: cupsaddsmb -U root HP_LaserJet_P3005_LPT_1
9. Настраиваем принтер на масдайном клиенте.
10. Радуемся :)

Вот конфиг самбы на всякий случай(/etc/samba/smb.conf):

[global]
workgroup = NKRES
netbios name = URSEKT44
security = SHARE
map to guest = Bad User
printcap name = cups
printing = cups
printcap cache time = 750
cups options = raw
load printers = yes
use client driver = yes
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
logon path = \\%L\profiles\.msprofile
logon drive = P:
logon home = \\%L\%U\.9xprofile
domain master = No
wins support = Yes
usershare allow guests = Yes

[homes]
comment = Home Directories
valid users = %S, %D%w%S
read only = No
inherit acls = Yes
browseable = No

[profiles]
comment = Network Profiles Service
path = %H
read only = No
create mask = 0600
directory mask = 0700
store dos attributes = Yes

[users]
comment = All users
path = /home
read only = No
inherit acls = Yes
veto files = /aquota.user/groups/shares/

[groups]
comment = All groups
path = /home/groups
read only = No
inherit acls = Yes

[printers]
comment = All Printers
path = /var/tmp
guest ok = Yes
read only = No
create mask = 0700
printable = Yes
browseable = Yes

[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin, root
force group = ntadmin
create mask = 0664
directory mask = 0775

[HP_LaserJet_P3005_LPT_1]
comment = HP LaserJet P3005
path = /var/tmp
read only = No
create mask = 0600
administrative share = Yes
guest ok = Yes
printable = Yes
printer name = HP_LaserJet_P3005_LPT_1
use client driver = Yes
force printername = Yes
oplocks = No
share modes = No

Вот что я подпилил в конфигах CUPS, в /etc/cups/mime.convs:

application/octet-stream application/vnd.cups-raw 0 -

Ну и в принципе все :)


Комментариев нет: