The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

форумы  помощь  поиск  регистрация  майллист  вход/выход  слежка  RSS
"lprng"
Вариант для распечатки  
Пред. тема | След. тема 
Форум Открытые системы на сервере (Разное)
Изначальное сообщение [ Отслеживать ]

"lprng"  +/
Сообщение от karpos email(ok) on 13-Окт-12, 13:20 
Задача организовать сервер печати linux lprn клинские машины на windows будут печатать не него а а он будет печатать на принтеры.

В данный момент сервер печатает если отправить печать с него командой lpr -Pочередь путь к фалу.
С клиентских машин не печатает куда копать не пойму. ниже конфигурации.  
printcap
/etc/printcap: printer capability database. See printcap(5).
# You can use the filter entries df, tf, cf, gf etc. for
# your own filters. See /etc/filter.ps, /etc/filter.pcl and
# the printcap(5) manual page for further details.

#kx
kx:\
  :lp=lp=KM8BC58E@192.168.0.15

#
pr10|p1522n_1:\
  :sd=/var/spool/lpd/hp1522n_1:\
  :af=/var/spool/lpd/hp1522n_1/acct:\
  :lf=/var/spool/lpd/hp1522n_1/error:\
  :mx#0:sh:\
  :rm=192.168.0.156:rp=raw:
#
hp1536:\
  :lp=/dev/null:sh:\
  :sd=/var/spool/lpd/hp1536:\
  :af=/var/spool/lpd/hp1536/acct:\
  :mx#0:sh
  :if=/usr/bin/smbprint3:
smbprint3 этот файл я взял с рабочего сервера он я так понял нужен для печати на расширенные принтеры

#!/bin/sh

# This script is an input filter for printcap printing on a unix machine. It
# uses the smbclient program to print the file to the specified smb-based
# server and service.
# For example you could have a printcap entry like this
#
# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint
#
# which would create a unix printer called "smb" that will print via this
# script. You will need to create the spool directory /usr/spool/smb with
# appropriate permissions and ownerships for your system.

# Set these to the server and service you wish to print to
# In this example I have a WfWg PC called "lapland" that has a printer
# exported called "printer" with no password.

#
# Script further altered by hamiltom@ecnz.co.nz (Michael Hamilton)
# so that the server, service, and password can be read from
# a /var/spool/lpd/PRINTNAME/.config file.
#
# In order for this to work the /etc/printcap entry must include an
# accounting file (af=...):
#
#   cdcolour:\
#    :cm=CD IBM Colorjet on 6th:\
#    :sd=/var/spool/lpd/cdcolour:\
#    :af=/var/spool/lpd/cdcolour/acct:\
#    :if=/usr/local/etc/smbprint:\
#    :mx=0:\
#    :lp=/dev/null:
#
# The /usr/var/spool/lpd/PRINTNAME/.config file should contain:
#   server=PC_SERVER
#   service=PR_SHARENAME
#   password="password"
#
# E.g.
#   server=PAULS_PC
#   service=CJET_371
#   password=""

#
# Debugging log file, change to /dev/null if you like.
#
# logfile=/tmp/smb-print.log
logfile=/dev/null


#
# The last parameter to the filter is the accounting file name.
#   Extract the directory name from the file name.
#   Concat this with /.config to get the config file.
#
eval acct_file=\${$#}
spool_dir=`dirname $acct_file`
config_file=$spool_dir/.config

# Should read the following variables set in the config file:
#   server
#   service
#   password
eval `cat $config_file`

#
# Some debugging help, change the >> to > if you want to same space.
#
echo "server $server, service $service" >> $logfile

(
# NOTE You may wish to add the line `echo translate' if you want automatic
# CR/LF translation when printing.
#       echo translate
    echo "print -"
    cat
) | /usr/bin/smbclient "//$server/$service" $password -U $server -N >> $logfile

настройки samba smb.conf

[global]
    log file = /var/log/samba/log.%m
#    socket options = TCP_NODELAY
    admin users = root
    invalid users = root
    null passwords = yes
    #domain master = no
    #netbios name = alisa
    server string = alisa
    writeable = yes
    #default = public
    #dos charset = 866
    workgroup = UST
    #os level = 255
    security = share
    #unix charset = KOI8-R
    #preferred master = yes
    max log size = 50
    map to guest = bad password
    guest account = nobody
    #wins support = Yes
    
    printcap name = /etc/printcap
    printing = lprng
    load printers = yes        
    
[printers]
    print ok = yes
    guest ok = no
    writable = no
    path = /var/spool/lpd/samba

[hp1536]
    printable = yes
    comment = отдел кадров
    public = yes
    writable = no
    browseable = yes

есть еще фалы lpd.conf (он можно сказать пустой) и lpd.perm я их не изменял.

Ответить | Правка | Cообщить модератору

Оглавление

  • lprng, karpos, 13:26 , 13-Окт-12, (1)  

Сообщения по теме [Сортировка по времени | RSS]


1. "lprng"  +/
Сообщение от karpos email(ok) on 13-Окт-12, 13:26 
почему не cups не спрашивайте ((( с ним тоже очень долго возился проблема уперлась в то что у меня два принтера сanon и возникла проблема с установкой cndrvcups-common , cndrvcups-lb вообщем от cups я отказался.
Ответить | Правка | ^ к родителю #0 | Наверх | Cообщить модератору

Архив | Удалить

Рекомендовать для помещения в FAQ | Индекс форумов | Темы | Пред. тема | След. тема




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2025 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру