Странность с сетевой печатью (CUPS + Samba)

Обсуждение настройки и работы сервисов, резервирования, сетевых настроек и вопросов безопасности ОС.

Модераторы: SLEDopit, Модераторы разделов

Аватара пользователя
Gang
Сообщения: 106

Странность с сетевой печатью

Сообщение Gang »

Здравствуйте всем )
В общем случилась странная штука:
вчера взяла, и просто отвалилась система печати. Локально с линукс машины все печатается с виндовс машин пишет "Не могу открыть принтер, нет доступа"
Причем отвалилась просто так (( сервер как работал так и работает.
Обновил самбу до 3.010, обновил CUPS все снес и поставил все заново!
сетевая печать так и не поднялась, Народ прошу помощи!
Система Mandrake 10.1 official
Вот конфиги:
/etc/printcap:

Код: Выделить всё

# This file was automatically generated by cupsd(8) from the
# /etc/cups/printers.conf file.  All changes to this file
# will be lost.
HP|LaserJet 2200D:rm=server:rp=HP:

/etc/samba/smb.conf:

Код: Выделить всё

#======================= Global Settings =====================================
[global]
    log file = /var/log/samba/log.%m
    smb passwd file = /etc/samba/smbpasswd
    load printers = yes
    printer = HP
    socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
    hosts equiv = 192.168.5.*
    interfaces = 192.168.5.1/255.255.255.0 192.168.2.2/255.255.255.0
    map to guest = bad user
    encrypt passwords = yes
    printer admin = @adm
    dns proxy = no
    netbios name = server
    server string = Samba Server %v
    printing = cups
    path = /var/spool
    default = global
    workgroup = Lab344
    os level = 20
    printcap name = cups
    security = user
    max log size = 50

[homes]
   comment = Home Directories
   browseable = no
   writable = yes
[printers]
    printer = HP
    printable = yes
    print command = lpr-cups -P %p -o raw %s -r   # using client side printer drivers.
    writable = no
    path = /var/spool/samba
    guest ok = yes
    comment = All Printers
    create mode = 0700
    use client driver = yes

[print$]
   path = /var/lib/samba/printers
   browseable = yes
   write list = @adm root
   guest ok = yes
   inherit permissions = yes
   # Settings suitable for Winbind:
   # write list = @"Domain Admins" root
   # force group = +@"Domain Admins"

[pdf-gen]
   path = /var/tmp
   guest ok = No
   printable = Yes
   comment = PDF Generator (only valid users)
   printing = bsd
   #print command = /usr/share/samba/scripts/print-pdf file path win_path recipient IP &
   print command = /usr/share/samba/scripts/print-pdf "%s" "%H" "//%L/%u" "%m" "%I" "%J" &
    lpq command = /bin/true

[test]
    printable = yes

/etc/cups/cupsd.conf:

Код: Выделить всё

LogLevel info


TempDir /var/spool/cups/tmp

Port 631

BrowseAddress @LOCAL

BrowseDeny All
BrowseAllow 127.0.0.1
BrowseAllow @LOCAL

BrowseOrder deny,allow

<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From @LOCAL
</Location>


AuthType Basic
AuthClass System

## Restrict access to local domain
Order Deny,Allow
Deny From All
Allow From 127.0.0.1

#Encryption Required
</Location>

#
# End of "$Id: cupsd.conf.in,v 1.14 2004/02/25 20:14:51 mike Exp $".
#

конфиг cupsd сгенерирован автоматически...
Заранее благодарен!
Спасибо сказали:
Аватара пользователя
Gang
Сообщения: 106

Re: Странность с сетевой печатью

Сообщение Gang »

Модераторы удалите плз тему
Все разобрался, все ок )
Спасибо сказали:
Аватара пользователя
Black
Сообщения: 1104
ОС: ArchLinux

Re: Странность с сетевой печатью

Сообщение Black »

Так расскажите как, может у кого-нибудь когда-нибудь будет такая же проблема.
Компьютер служит для решения тех проблем, которых до изобретения компьютера не существовало
Спасибо сказали:
Аватара пользователя
Gang
Сообщения: 106

Re: Странность с сетевой печатью

Сообщение Gang »

Ну в общем все оказалось очень просто и странно.
Выяснилось, что ето все началось после того как сотрудник послал на принтер не тот документ, и отменил его кнопочкой "ресет"...
После етого печать вырубилась у всех вин пользователей, с сообщением как я писал в 1 посте.
В общем потратил я целый день ничего не помогало... Потом нашел /var/cache/samba/printing лежал как раз вот етот прерванный файлик, причем в dmesg выдавалось что-то типа ...error_magic_06667 точно не помню, ну в общем я их удалил, и тут же вес у всех заработало ... Вот )
Спасибо сказали:
Аватара пользователя
Voler
Сообщения: 498
ОС: Fedora

Re: Странность с сетевой печатью

Сообщение Voler »

Подскажите подключил к компьютеру с Fedora 10 принтер
cat /etc/printcap

Код: Выделить всё

# This file was automatically generated by cupsd(8) from the
# /etc/cups/printers.conf file.  All changes to this file
# will be lost.
LASER-SHOT-LBP-1120|Canon LASER SHOT LBP-1120:rm=mo.stim.ru:rp=LASER-SHOT-LBP-1120:


Все принтер определился нормально.

В конфиге самбы следующее

Код: Выделить всё

[global]
        unix charset = utf8
        display charset = cp1251
        workgroup = work
        netbios name = server
        netbios aliases = samba
        server string = Files Server
        interfaces = lo, eth0, 127.0.0.1, 192.168.2.0/255.255.255.0, 192.168.3.0/255.255.255.0
        smb passwd file = /etc/samba/smbpasswd
        passdb backend = tdbsam
        username map = /etc/samba/smbusers
        password level = 4
        username level = 4
        client lanman auth = Yes
        log file = /var/log/samba/log.%m
        max log size = 1024
        name resolve order = lmhosts wins bcast
        time server = Yes
        deadtime = 30
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        hostname lookups = Yes
        path = /samba/spool
        printer admin = autosystem
        hosts allow = 127., 192.168.2., 192.168.3.
        printer name = LASER-SHOT-LBP-1120
        case sensitive = No

[printers]
        comment = ATS
        path = /samba/spool/printer
        create mask = 0775
        printable = Yes
        use client driver = Yes
        browseable = No
[print$]
        path = /samba/spool/printer
        write list = autosystem, ifedorenko, vsinyaev
        inherit permissions = Yes


Права на шары

Код: Выделить всё

drwxrwxrwx  3 vsinyaev admins    4.0K 2009-04-01 18:03 spool/
drwxrwxrwx  2 vsinyaev admins    4.0K 2009-04-01 18:22 printer/


testparm проходит нормально
Load smb config files from /etc/samba/smb.conf
WARNING: The "printer admin" option is deprecated
Processing section "[printers]"
Processing section "[homes]"
Processing section "[admins]"
Processing section "[managers]"
Processing section "[Software]"
Processing section "[Scripts]"
Processing section "[Drivers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions


Конфиг cupsd.conf не трогал.

Код: Выделить всё

Vim: Warning: Output is not to a terminal
MaxLogSize 0

LogLevel info

SystemGroup sys root


Listen localhost:631
Listen /var/run/cups/cups.sock

Browsing On
BrowseOrder allow,deny
BrowseAllow all

DefaultAuthType Basic

<Location />
  Order allow,deny
</Location>

<Location /admin>
  Encryption Required
  Order allow,deny
</Location>

<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny


Так вот проблема в том что отправляю на печать, ошибки ни какой не пишется у пользователей, но вот принтер и не печатает.

В логе только это messages

Код: Выделить всё

Apr  1 18:04:30 mo smbd[22685]: [2009/04/01 18:04:30,  0] printing/print_cups.c:cups_connect(78)
Apr  1 18:04:30 mo smbd[22685]:   Unable to connect to CUPS server /var/run/cups/cups.sock:631 - No such file or directory
Apr  1 18:04:30 mo smbd[22685]: [2009/04/01 18:04:30,  0] printing/print_cups.c:cups_connect(78)
Apr  1 18:04:30 mo smbd[22685]:   Unable to connect to CUPS server /var/run/cups/cups.sock:631 - No such file or directory
Apr  1 18:04:47 mo smbd[22685]: [2009/04/01 18:04:47,  0] printing/print_cups.c:cups_connect(78)
Apr  1 18:04:47 mo smbd[22685]:   Unable to connect to CUPS server /var/run/cups/cups.sock:631 - No such file or directory
Apr  1 18:04:47 mo smbd[22685]: [2009/04/01 18:04:47,  0] printing/print_cups.c:cups_connect(78)
Apr  1 18:04:47 mo smbd[22685]:   Unable to connect to CUPS server /var/run/cups/cups.sock:631 - No such file or directory
Apr  1 18:04:47 mo smbd[22685]: [2009/04/01 18:04:47,  0] printing/print_cups.c:cups_connect(78)
Apr  1 18:04:47 mo smbd[22685]:   Unable to connect to CUPS server /var/run/cups/cups.sock:631 - No such file or directory
Apr  1 18:04:47 mo smbd[22685]: [2009/04/01 18:04:47,  0] printing/print_cups.c:cups_connect(78)
Apr  1 18:04:47 mo smbd[22685]:   Unable to connect to CUPS server /var/run/cups/cups.sock:631 - No such file or directory
Apr  1 18:04:47 mo smbd[22685]: [2009/04/01 18:04:47,  0] printing/print_cups.c:cups_connect(78)
Apr  1 18:04:47 mo smbd[22685]:   Unable to connect to CUPS server /var/run/cups/cups.sock:631 - No such file or directory
Apr  1 18:04:47 mo smbd[22685]: [2009/04/01 18:04:47,  0] printing/print_cups.c:cups_connect(78)
Apr  1 18:04:47 mo smbd[22685]:   Unable to connect to CUPS server /var/run/cups/cups.sock:631 - No such file or directory
Apr  1 18:04:47 mo smbd[22685]: [2009/04/01 18:04:47,  0] printing/print_cups.c:cups_connect(78)
Apr  1 18:04:47 mo smbd[22685]:   Unable to connect to CUPS server /var/run/cups/cups.sock:631 - No such file or directory
Apr  1 18:04:47 mo smbd[22685]: [2009/04/01 18:04:47,  0] printing/print_cups.c:cups_connect(78)
Apr  1 18:04:47 mo smbd[22685]:   Unable to connect to CUPS server /var/run/cups/cups.sock:631 - No such file or directory
Apr  1 18:04:47 mo smbd[22685]: [2009/04/01 18:04:47,  0] printing/print_cups.c:cups_connect(78)
Apr  1 18:04:47 mo smbd[22685]:   Unable to connect to CUPS server /var/run/cups/cups.sock:631 - No such file or directory
Apr  1 18:04:47 mo smbd[22685]: [2009/04/01 18:04:47,  0] printing/print_cups.c:cups_connect(78)
Apr  1 18:04:47 mo smbd[22685]:   Unable to connect to CUPS server /var/run/cups/cups.sock:631 - No such file or directory
Apr  1 18:12:00 mo smbd[26772]: [2009/04/01 18:12:00,  0] printing/print_cups.c:cups_job_submit(982)
Apr  1 18:22:07 mo smbd[26901]: [2009/04/01 18:22:07,  0] printing/print_cups.c:cups_job_submit(982)


В /var/log/cups/access_log

Код: Выделить всё

localhost - - [01/Apr/2009:18:12:00 -0400] "POST /printers/LASER-SHOT-LBP-1120 HTTP/1.1" 200 223898 Print-Job client-error-document-format-not-supported
localhost - - [01/Apr/2009:18:22:07 -0400] "POST /printers/LASER-SHOT-LBP-1120 HTTP/1.1" 200 220306 Print-Job client-error-document-format-not-supported


В cat /var/log/cups/error_log

Код: Выделить всё

I [01/Apr/2009:18:12:00 -0400] [Job ???] Request file type is application/octet-stream.
E [01/Apr/2009:18:12:39 -0400] Resume-Printer: Unauthorized
I [01/Apr/2009:18:12:39 -0400] Saving printers.conf...
I [01/Apr/2009:18:12:39 -0400] Printer "LASER-SHOT-LBP-1120" started by "root".
I [01/Apr/2009:18:16:04 -0400] Scheduler shutting down normally.
I [01/Apr/2009:18:16:04 -0400] Saving job cache file "/var/cache/cups/job.cache"...
I [01/Apr/2009:18:16:04 -0400] Listening to 127.0.0.1:631 (IPv4)
I [01/Apr/2009:18:16:04 -0400] Listening to /var/run/cups/cups.sock (Domain)
I [01/Apr/2009:18:16:04 -0400] Loaded configuration file "/etc/cups/cupsd.conf"
I [01/Apr/2009:18:16:04 -0400] Using default TempDir of /var/spool/cups/tmp...
I [01/Apr/2009:18:16:04 -0400] Configured for up to 100 clients.
I [01/Apr/2009:18:16:04 -0400] Allowing up to 100 client connections per host.
I [01/Apr/2009:18:16:04 -0400] Using policy "default" as the default!
I [01/Apr/2009:18:16:04 -0400] Full reload is required.
I [01/Apr/2009:18:16:04 -0400] Loaded MIME database from '/etc/cups': 35 types, 38 filters...
I [01/Apr/2009:18:16:04 -0400] Loading job cache file "/var/cache/cups/job.cache"...
I [01/Apr/2009:18:16:04 -0400] Full reload complete.
I [01/Apr/2009:18:16:04 -0400] Cleaning out old temporary files in "/var/spool/cups/tmp"...
I [01/Apr/2009:18:16:04 -0400] Listening to 127.0.0.1:631 on fd 4...
I [01/Apr/2009:18:16:04 -0400] Listening to /var/run/cups/cups.sock on fd 5...
I [01/Apr/2009:18:16:04 -0400] Resuming new connection processing...
I [01/Apr/2009:18:22:07 -0400] [Job ???] Request file type is application/octet-stream.


Прошу особо не ругать первый раз настраиваю печать по сети в Linux.
Спасибо сказали:
Аватара пользователя
Ленивая Бестолочь
Бывший модератор
Сообщения: 2760
ОС: Debian; gentoo

Re: Странность с сетевой печатью

Сообщение Ленивая Бестолочь »

/etc/printcap не имеет отношения к CUPS. это файл настройки для lpr.
вы хотите капсом пользоваться? тогда давайте /etc/printers.conf посмотреть.
капс на той же машине, что и самба?
Солнце садилось в море, а люди с неоконченным высшим образованием выбегали оттуда, думая, что море закипит.
Спасибо сказали:
Аватара пользователя
Voler
Сообщения: 498
ОС: Fedora

Re: Странность с сетевой печатью

Сообщение Voler »

Да samba и cups сервер на одном Linux сервере под управлением Fedora 10

Вот конфиг

Код: Выделить всё

# Printer configuration file for CUPS v1.3.9
# Written by cupsd on 2009-04-01 19:04
<DefaultPrinter LASER-SHOT-LBP-1120>
Info Canon LASER SHOT LBP-1120
Location samba
DeviceURI usb://Canon/LASER%20SHOT%20LBP-1120
State Idle
StateTime 1238627076
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>
Спасибо сказали: