
		dyegofduarte
		
		(usa Fedora)
		
		Enviado em 26/12/2010 - 22:48h 
		Estou configurando um servidor cups, para ter integração com o samba, para que quando os usuários de windows acessem o compartilhamento do smaba, apareceça 
as impressoras e quando eles clicarem na impressora desejada, o driver de windows seja instalado, automaticamente, mas as impressorass não aparecem no 
compartilhamento, quando entro no compartilhamento, e no final do endereço do compartilhamento coloco a palavra printers, pede para instalar um impressora, 
que instala normal com qualquer drive, mas não manda nada para nenhuma das impressoras já instaladas no servidor.
segue meus arquivos de configuração:
smb.conf
####################################################################
# Global parameters
[global]
        unix charset = ISO-8859-1
#       unix charset = UTF-8
        workgroup = EMPRESA
        netbios name = PRINTSERVER
        server string = SERVIDOR CORPORATIVO
        security = share
        obey pam restrictions = Yes
        log level = 0
#       pam password change = Yes
        passwd program = /usr/bin/passwd %u
        passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
        username map = /etc/samba/smbusers
        unix password sync = Yes
        log file = /var/log/samba/%m.log
        max log size = 100
#       socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        add user script = /usr/sbin/adduser -c %u -g dusers -d /home/users/%u -s /bin/null %u
        delete user script = /usr/sbin/userdel -r %u
        add group script = /usr/sbin/groupadd %g
        delete group script = /usr/sbin/groupdel %g
        add user to group script = /usr/sbin/gpasswd -a %u %g
        delete user from group script = /usr/sbin/gpasswd -d %u %g
        add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
        domain logons = no
        os level = 255
        preferred master = no
        domain master = no
        wins support = no
        ldap ssl = no
        admin users = root
#       printer admin = root
        #create mask = 0777
#       hide dot files = yes
        logon script = logon.bat
        logon drive =
        logon home =
        logon path =
        printcap name = /etc/printcap
        printing = cups
load printers = yes
        cups options = raw
#       mangled names = yes
#       mangle prefix = 6
#       mangling char = ~
#       mangling method = hash2
#       use sendfile = no
#       large readwrite = no
#       max xmit = 16644
#       level2 oplocks = no
#       oplocks = no
        guest account = nobody
        veto files = /Maildir/.Trash-mauricio/.Trash-root/.recycle/.kde/.bash_logout/.bash_profile/.bashrc/.gtkrc/
        socket options = TCP_NODELAY IPTOS_LOWDELAY
#       read raw = yes
#       write raw = yes
#       max xmit = 65535
#       dead time = 15
#       getwd cache = yes
#       idmap uid = 16777216-33554431
#       idmap gid = 16777216-33554431
#       template shell = /bin/false
#       winbind use default domain = no
        recycle:exclude = *.TXT *.OK *.EXE
##      recycle:keeptree = True
#       recycle:touch = True
#       recycle:versions = True
#       recycle:noversions = .doc|.xls|.ppt
#       recycle:repository = /dados/.Trasj-root
#       create mask = 0777
#       directory mask = 0777
#       vfs objects = recycle
[netlogon]
        comment = Network Logon Service
        path = /home/netlogon
        guest ok = Yes
        browseable = No
        share modes = No
#[homes]
#       comment = Home Directories
#       valid users = %S
#       writeable = yes
#       create mask = 0600
#       directory mask = 0700
#       browseable = No
[printers]
        comment = All Printers
        path = /var/spool/samba
        printable = Yes
        browseable = Yes
        public = Yes
        read only = No
        use client driver = Yes
        guest ok = Yes
        lpq command = lpstat -o %p
        lprm command = cancel %p-%j
        path = /var/spool/samba
[print$]
        comment = Printer Drivers Share
        path = /DRIVERS-IMP
        writable = Yes
        write list = root
[dados]
        comment = Dados 
        path = /home/dados
        public = Yes
        writeable = yes
        create mask = 2777
        force create mode = 2777
        directory mask = 2777
        force directory mode = 2777
        vfs object = recycle
[Trash]
        comment = Lixeira
        path = /dados/.recycle
        public = Yes
        read only = no
        writeable = yes
        create mask = 0777
        force create mode = 0777
        directory mask = 0777
        force directory mode = 0777
        allow hosts = 10.10.10.82, 10.10.10.1
[Copia]
        comment = Copia
        path = /dados/Copia
        public = Yes
        read only = no
        writeable = yes
        create mask = 0777
        force create mode = 0777
        directory mask = 0777
        force directory mode = 0777
[Comunica]
        comment = Comunica
        path = /dados/Comunica
        public = Yes
        read only = no
        writeable = yes
        create mask = 0777
        force directory mode = 0777
include = /etc/samba/Serv.conf
####################################################################
cupsd.conf
####################################################################
xLogSize 2000000000
LogLevel info
SystemGroup sys root
# Allow remote access
Port 631
Listen /var/run/cups/cups.sock
# Enable printer sharing and shared printers.
Browsing On
BrowseOrder allow,deny
# (Change '@LOCAL' to 'ALL' if using directed broadcasts from another subnet.)
BrowseAllow @LOCAL
BrowseAddress @LOCAL
DefaultAuthType Basic
<Location />
 Allow From All
 Allow all
 # Allow shared printing and remote administration...
 Order allow,deny
 Allow all
</Location>
<Location /admin>
 Allow From All
 Encryption Required
 Allow all
 # Allow remote administration...
 Order allow,deny
 Allow all
</Location>
<Location /admin/conf>
 AuthType Default
 Require user @SYSTEM
 Allow From All
 Allow all
 # Allow remote access to the configuration files...
 Order allow,deny
 Allow all
</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
   Allow From All
   Order deny,allow
</Limit>
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
   AuthType Default
   Require user @SYSTEM
   Allow From All
   Order deny,allow
</Limit>
<Limit Pause-Printer Resume-Printer 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-Accept-Jobs CUPS-Reject-Jobs>
   AuthType Default
   Require user @SYSTEM
   Allow From All
   Order deny,allow
</Limit>
<Limit CUPS-Authenticate-Job>
   Require user @OWNER @SYSTEM
   Allow From All
   Order deny,allow
</Limit>
<Limit All>
   Allow From All
   Order deny,allow
</Limit>
</Policy>
####################################################################