PROBLEMAS CUPS PDF [RESOLVIDO]

1. PROBLEMAS CUPS PDF [RESOLVIDO]

Allan
allanmariani03

(usa CentOS)

Enviado em 05/04/2011 - 16:39h

Amigos, boa tarde, estou com um problema e não consigo achar uma solução pois existe muito pouco conteúdo sobre o mesmo nos foruns e menos ainda no site oficial.

Estou com a seguinte configuração:

Servidor CUPS com autenticação meu AD via SAMBA com os hosts windows de minha rede puxando os drivers das impressoras diretamente do meu servidor SAMBA.

O Cups e Samba estão configurados e rodando certinho, meu problema é, eu instalei o CUPS-PDF, criei uma impressora virtual pdf pelo CUPS, adicionei um drivers PS para esta impressora e estou conseguindo imprimir os documentos em pdf normalmente porém esses documentos vão para a pasta ANONYMOUS com usuário e grupo nobody, ou seja não está puxando meu usuário do AD. Gostaria de colocar uma segurança para o próprio usuário quando o mesmo imprimisse seu documento pdf, porém sem ele puxar essas informações não é possível. Já tentei alterar o cups-pdf.conf e não adianta...segue meu SMB.CONF, CUPSD.CONF E CUPS-PDF.CONF

SMB.CONF

#======================= Global Settings =======================

[global]

workgroup = MARBA2000

netbios name = Saturno

server string = Servidor de Impressao Cups

log file = /var/log/samba/%m.log

max log size = 50

security = ADS

realm = MARBA2000.COM.BR

encrypt passwords = yes

server signing = yes

smb passwd file = /etc/samba/smbpasswd

allow trusted domains = no

unix password sync = yes

passwd program = /usr/bin/passwd %u

passwd chat = *New*password* %n\n *Retype*new*password* %n\n*passwd:*all*authentication*tokens*updated*successfully*

pam password change = yes

obey pam restrictions = yes

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

dns proxy = no

idmap uid = 10000-1000000

idmap gid = 10000-1000000

idmap backend = idmap_rid:COMPANY=10000-1000000

winbind use default domain = yes

winbind separator = +

winbind enum users = yes

winbind enum groups = yes

template shell = /bin/bash

template homedir = /home/%U

########## Printing ##########

load printers = yes
printing = cups

[homes]
valid users = %S
create mask = 0700
directory mask = 0700
browseable = no

[printers]

comment = Todas as Impressoras
path = /var/spool/samba
print ok = yes
browseable = yes
write list = @MARBA2000+printers
valid users = @MARBA2000+printers
force printername = yes


[print$]
comment = Drivers de impressao para os clientes Windows
path = /var/lib/samba/printers/
browseable = yes
write list = @MARBA2000+printers
valid users = @MARBA2000+printers
read only = yes
inherit permissions = yes


CUPSD.CONF

LogLevel info
SystemGroup printers
Port 631
Listen /var/run/cups/cups.sock
Browsing On
BrowseOrder allow,deny
BrowseAllow @LOCAL
BrowseAddress @LOCAL
DefaultAuthType Basic

<Location />
Order deny,allow
Deny From All
Allow localhost
Allow From 192.168.*
</Location>
<Location /admin>
Encryption Required
Order deny,allow
Deny From All
Allow localhost
Allow From 192.168.*
</Location>
<Location /admin/conf>
AuthType Basic
Require user @SYSTEM
Order deny,allow
Deny From All
Allow localhost
</Location>
<Policy default>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit Pause-Printer Resume-Printer Set-Printer-Attributes Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Add-Printer CUPS-Delete-Printer CUPS-Add-Class CUPS-Delete-Class CUPS-Accept-Jobs CUPS-Reject-Jobs CUPS-Set-Default>
AuthType Basic
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit CUPS-Authenticate-Job>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit Cancel-Job>
Order deny,allow
Require user @OWNER @SYSTEM
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
Printcap /var/run/cups/printcap

CUPS-PDF.CONF

# cups-pdf.conf -- CUPS Backend Configuration (version 2.4.2, 2006-09-30)
# 18.09.2005, Volker C. Behr
# Exp. Physik V, Uni Wuerzburg
# vrbehr@cip.physik.uni-wuerzburg.de
# http://cip.physik.uni-wuerzburg.de/~vrbehr/cups-pdf
#
#
# This code may be freely distributed as long as this header
# is preserved. Changes to the code should be clearly indicated.
#
# This code is distributed under the GPL.
# (http://www.gnu.org/copyleft/gpl.html)
#
# For more detailed licensing information see cups-pdf.c in the
# corresponding version number.

###########################################################################
# #
# This is the configuration file for CUPS-PDF. Values that are not set in #
# here will use the defaults. Changes take effect immediately without the #
# need for restarting any services. #
# #
# Take care not to add whitespaces at the end of a line! #
# #
###########################################################################


###########################################################################
# #
# Path Settings #
# #
###########################################################################

### Key: Out
## CUPS-PDF output directory
## special qualifiers:
## ${HOME} will be expanded to the user's home directory
## ${USER} will be expanded to the user name
## in case it is an NFS export make sure it is exported without
## root_squash!
### Default: /var/spool/cups-pdf/${USER}

Out ${HOME}/${USER}


### Key: AnonDirName
## ABSOLUTE path for anonymously created PDF files
## if anonymous access is disabled this setting has no effect
### Default: /var/spool/cups-pdf/ANONYMOUS

AnonDirName /var/spool/cups-pdf/ANONYMOUS

### Key: Spool
## CUPS-PDF spool directory - make sure there is no user 'SPOOL' on your
## system or change the path
### Default: /var/spool/cups-pdf/SPOOL

#Spool /var/spool/cups-pdf/SPOOL


###########################################################################
# #
# Filename Settings #
# #
###########################################################################

### Key: Cut
## removing file name extensions before appending .pdf to output
## extensions will only be removed if _both_ the following criteria are met:
## - the extension (w/o the dot) is not longer than <Out> characters
## - the remaining filename has a minimal length of 1 character
## set Cut to -1 in order to disable cutting
## recommended values: pure UNIX environment : -1
## mixed environments : 3
### Default: 3

#Cut 3

### Key: Label
## label all jobs with a unique job-id in order to avoid overwriting old
## files in case new ones with identical names are created; always true for
## untitled documents
## 0: label untitled documents only, 1: label all documents
### Default: 0

Label 1

### Key: TitlePref
## where to look first for a title when creating the output filename
## (title in PS file or title on commandline):
## 0: prefer title from %Title statement in the PS file
## 1: prefer title passed via commandline
### Default: 0

#TitlePref 0


###########################################################################
# #
# User Settings #
# #
###########################################################################

### Key: AnonUser
## user for anonymous PDF creation (this might be a security issue)
## set this to an empty value to disable anonymous
### Default: nobody

#AnonUser nobody

### Key: LowerCase
## This options allows to check user names given to CUPS-PDF additionally
## against their lower case variants. This is necessary since in some
## Windows environments only upper case user names are passed. Usually UNIX
## user names are all lower case and it is save to use this option
## but be aware that it can lead to mis-identifications in case
## you have user names that differ only in upper/lower case.
## check only against user name as passed to CUPS : 0
## check additionally against lower case user name : 1
### Default: 1
LowerCase 1

### Key: UserPrefix
## some installations require a domain prefix added to the user name
## leave empty for no prefix
### Default: <empty>
UserPrefix
### Key: DirPrefix
## if a prefix was defined above this switch toggels whether to include
## the prefix in the output directory's name (if not $HOME) or not
## 0: do not include, 1: include
### Default: 0

DirPrefix 1

### Key: RemovePrefix
## some installation pass usernames with a prefix (usually a domain name)
## if you do not want this prefix to be used by the ${USER} variable for
## output directories put the part which is to be cut here
### Default: <empty>

#RemovePrefix


###########################################################################
# #
# Security Settings #
# #
###########################################################################

### Key: AnonUMask
## umask for anonymous output
## these are the _inverse_ permissions to be granted
### Default: 0000

#AnonUMask 0000

### Key: UserUMask
## umask for user output of known users
## changing this can introduce security leaks if confidential
## information is processed!
### Default: 0077

UserUMask 0077

### Key: Grp
## group cups-pdf is supposed to run as - this will also be the gid for all
## created directories and log files
### Default: lp

#Grp lp


###########################################################################
# #
# Log Settings #
# #
###########################################################################
### Key: Log
## CUPS-PDF log directory
## set this to an empty value to disable all logging
### Default: /var/log/cups

#Log /var/log/cups/pdf.log

### Key: LogType
## log-mode
## 1: errors
## 2: status (i.e. activity)
## 4: debug - this will generate a lot of log-output!
## add up values to combine options, i.e. 7 is full logging
## if logging is disabled these setting have no effect
### Default: 3

#LogType 1


###########################################################################
# #
# PDF Conversion Settings #
# #
###########################################################################

### Key: GhostScript
## location of GhostScript binary (gs)
## MacOSX: for using pstopdf (recommended) set this to /usr/bin/pstopdf
## or its proper location on your system
### Default: /usr/bin/gs

#GhostScript /usr/bin/gs

### Key: GSTmp
## location of temporary files during GhostScript operation
## this must be user-writable like /var/tmp or /tmp !
### Default: /var/tmp

#GSTmp /var/tmp

### Key: GSCall
## command line for calling GhostScript (!!! DO NOT USE NEWLINES !!!)
## MacOSX: for using pstopdf set this to %s %s -o %s %s
### Default: %s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="%s" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c save pop -f %s

#GSCall %s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="%s" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c save pop -f %s

### Key: PDFVer
## PDF version to be created - can be "1.5", "1.4", "1.3" or "1.2"
## MacOSX: for using pstopdf set this to an empty value
### Default: 1.4

#PDFVer 1.4

### Key: PostProcessing
## postprocessing script that will be called after the creation of the PDF
## as arguments the filename of the PDF and the username will be passed
## the script will be called with user privileges
## set this to an empty value to use no postprocessing
### Default: <empty>

#PostProcessing


###########################################################################
# #
# Experimental Settings #
# These settings activate experimental options. If you decide to use #
# them I would appreciate any feedback - including an 'ok' if they #
# work as expected - so I can eventually put them into the non- #
# experimental sections. #
# #
###########################################################################

### Key: DecodeHexStrings
## this option will try to decode hex strings in the title to allow
## internationalized titles
## (have a look at contrib/pstitleconv for a suitable filter for data
## from Windows clients)
## 0: disable, 1: enable
### Default: 0

#DecodeHexStrings 0







Gostaria de saber se algué já viu esse erro ou se alguém sabe outro software ou método de criar uma impressora virtual pdf para usuários em rede heterogênicas Linux/Windows.

Desde já agradeço a atenção de todos...


  


2. Re: PROBLEMAS CUPS PDF [RESOLVIDO]

Perfil removido
removido

(usa Nenhuma)

Enviado em 05/04/2011 - 17:24h

o caminho onde o arquivo PDF é salvo deve ser definido nessa linha:

Out ${HOME}/${USER}

meu exemplo:

Out ${HOME}/PDF

* pasta PDF dentro da minha /home/h4rd3r

daí defina o caminho corretamente e veja se funciona.


Sobre essa pasta ANONYMOUS ela está desabilitada no meu caso, ou seja assim:

#AnonDirName /var/spool/cups-pdf/ANONYMOUS


sobre Samba, Redes, Windows não opino pois não trabalho com Redes.


3. Re: PROBLEMAS CUPS PDF [RESOLVIDO]

Allan
allanmariani03

(usa CentOS)

Enviado em 06/04/2011 - 10:28h

Amigo, bom dia, Obrigado pelo post.Eu coloquei essa configuração que vc me falou, eu já tinha feito testes também com ela colocando:

Out ${HOME}/pdf e a linha AnonDirName /var/spool/cups-pdf/ANONYMOUS eu também deixei comentada e mesmo assim todos os pdfs caem na pasta ANONYMOUS....parece que o cups-pdf não está atualizando o conf....

Obrigado


4. Re: PROBLEMAS CUPS PDF [RESOLVIDO]

Perfil removido
removido

(usa Nenhuma)

Enviado em 06/04/2011 - 19:41h

após qualquer alteração em .confs o serviço relacionado deve ser reiniciado, seja o Squid, Samba ou o seu caso: o CUPS, fez isso?


5. Re: PROBLEMAS CUPS PDF [RESOLVIDO]

Allan
allanmariani03

(usa CentOS)

Enviado em 07/04/2011 - 07:45h

Fiz sim concerteza é o básico xD, resolvi o problema configurando uma impressora virtual pdf no samba utilizando autenticação kerberos...obrigado mesmo assim pelo retorno, vou criar um tutorial explicando certinho depois esse projeto que desenvolvi acredito que será bem interessante....vlw


6. perguntas basicas

torre
torredegiralda

(usa Debian)

Enviado em 24/05/2011 - 00:30h

ola posso fazer um servidor cups em um dominio windows AD sem o samba?






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts