[Samba] 'Little' problems with Samba v2.2.3a-12.3 (Debian Woody) and PRINTERS !!

Farget Vincent farget at olfac.univ-lyon1.fr
Wed Jun 18 12:16:57 GMT 2003


Hi,


I am using Samba (v2.2.3a-12.3 on stable Debian Woody) on a bi-cpu server 
(named MYSRV) acting as a primary domain controller. All works well except 
for printers where I have severals little problems. I use LPRng (v3.8.10-1.2 
on stable Debian Woody) as my linux lpd spooler on my server. I have 2 
printers : one HP LaserJet 4000N (named nss.1er) and one HP LaserJet 4050N 
(named nss.rdc). I have configured the 2 printers on the server using 
'printtool'. I choosed the 'Remote Unix (lpd) Queue'. As both HP4000N and 
HP4050N can understand postcript documents, I choose '*auto* - Postscript' as 
my input filter for the two printers. All works well (samba : PDC, printers) 
except that I have problems with uploading and downloading printers driver on 
my samba server.
Here is my '/etc/printcap' file :

--->  /etc/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 the printcap(5) manual page for further
# details.
##PRINTTOOL3## REMOTE POSTSCRIPT 600x600 a4 {} PostScript Default {}
nss.rdc:\
        :sd=/var/spool/lpd/nss.rdc:\
        :lp=IP.ADDR.HP4050N%9100:\
        :as=--> ORIGINE $n $P $t:\
        :ae=|/var/spool/lpd/nssrdc-acct.pl:\
        :af=/var/spool/lpd/nssrdc.acct:\
        :lf=/var/spool/lpd/nssrdc.log:\
        :bl=:\
        :user=daemon:\
        :sh:\
        :mx#0:\
        :lpd_bounce=true:\
        :if=/usr/lib/printfilters/master-filter:\
        :PAPERSIZE=a4:\
        :DESIRED_TO=ps:\
        :PRINTER_TYPE=REMOTE:\
        :ASCII_TO_PS=YES:\
        :GSDEVICE=POSTSCRIPT:\
        :RESOLUTION=600x600:\
        :PS_SEND_EOF=YES:\
        :NUP=1:\
        :RTLFTMAR=18:\
        :TOPBOTMAR=18:\
        :TEXT_SEND_EOF=NO:
##PRINTTOOL3## REMOTE POSTSCRIPT 600x600 a4 {} PostScript Default {}
nss.1er:\
        :sd=/var/spool/lpd/nss.1er:\
        :rm=IP.ADDR.HP4000N:\
        :rp=IP.ADDR.HP4000N:\
        :as=--> ORIGINE $n $P $t :\
        :ae=|/var/spool/lpd/nss1er-acct.pl:\
        :af=/var/spool/lpd/nss1er.acct:\
        :lf=/var/spool/lpd/nss1er.log:\
        :bl=:\
        :user=daemon:\
        :sh:\
        :mx#0:\
        :lpd_bounce=true:\
        :if=/usr/lib/printfilters/master-filter:\
        :PAPERSIZE=a4:\
        :DESIRED_TO=ps:\
        :PRINTER_TYPE=REMOTE:\
        :ASCII_TO_PS=YES:\
        :GSDEVICE=POSTSCRIPT:\
        :RESOLUTION=600x600:\
        :PS_SEND_EOF=YES:\
        :NUP=1:\
        :RTLFTMAR=18:\
        :TOPBOTMAR=18:\
        :TEXT_SEND_EOF=NO:
---> END of /etc/printcap

I have configured Samba manually using 'vi' :-)
The last modification I have done is the 'print$' share which there is only 
two directories behind : W32X86 and WIN40. No files are present in these two 
directories (I don't really know what files must I put there).

Here is my '/etc/samba/smb.conf' file :
(ME is my user name linux/samba account)

---> /etc/samba/smb.conf
# /etc/samba/smb.conf -> 'MYSRV'
# Samba config file created by VF
# Lundi 02 Juin 2003  13:30

[global]
        workgroup = MYDOM
        netbios name = MYSRV
        server string = Serveur Intranet (domaine MYDOM)
        security = domain
        encrypt passwords = Yes
        smb passwd file = /etc/samba/smbpasswd
        password server = MYSRV
        passwd program = /usr/bin/passwd %u
        passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n
        username map = /etc/samba/smbusers
        unix password sync = Yes
        log level = 1
        log file = /var/log/samba/log.%m
        max log size = 1000
        time offset = 0
        time server = Yes
        socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=4096 
SO_RCVBUF=4096
        logon drive = u:
        logon script = %U.bat
        domain logons = Yes
        domain master = Yes
        hosts allow = MY.DOM.IP.ADDR/255.255.255.128
        add user script = /usr/sbin/useradd -d /dev/null -g pcwinnt -c 
'Compte PC' -s /bin/false -M %u
        admin users = root, ME
        show add printer wizard = Yes
        printer admin = root, ME

[netlogon]
        comment = Batch de connexion au domaine MYDOM
        path = /netlogon
        available = Yes
        writeable = No
        browseable = No

[homes]
        comment = Partage perso (disque U)
        available = Yes
        writeable = Yes
        create mask = 0700
        directory mask = 0700
        browseable = Yes

[print$]
        comment = Partage driver Imprimantes reseaux
        path = /var/spool/lpd/drivers-imp
        admin users = root, ME
        valid users = @lp
        available = Yes
        read only = Yes
        write list = root, farget
        force user = root
        force group = lp
        create mask = 0750
        directory mask = 0750
        browseable = Yes

[commun]
        comment = Partage commun (disque P)
        path = /common
        available = Yes
        writeable = Yes
        create mask = 0775
        directory mask = 0775
        browseable = Yes

[nss.rdc]
        comment = Partage imprimante HP4050N (1er etage)
        path = /var/spool/lpd/nss.rdc.spool
        admin users = root, ME
        valid users = @lp
        printable = Yes
        writeable = No
        browseable = Yes

[nss.1er]
        comment = Partage imprimante HP4000N (2eme etage)
        path = /var/spool/lpd/nss.1er.spool
        admin users = root, ME
        valid users = @lp
        printable = Yes
        writeable = No
        browseable = Yes

...... ect ......
---> END of /etc/samba/smb.conf

User 'root' and 'ME' are present in 'lp' group. 


Here are my questions :

1.) 
I have not define the same spool directory between 'sd' printcap and path in 
smb.conf for each HP printer. 
nss.rdc : 
printcap : sd = /var/spool/lpd/nss.rdc
smb.conf : path = /var/spool/lpd/nss.rdc.spool
nss.1er :
printcap : sd = /var/spool/lpd/nss.1er
smb.conf : path = /var/spool/lpd/ns.1er.spool
Is it a problem ? Must I define the same directory ?


2.) 
As I have added manually, my printers, in the samba 'smb.conf' file, why 
there is one printer with 'Samba Printer Port' as portname and the other with 
'\\MYSRV\nss.1er' as portname when I use the rpcclient's enumprinters command 
? Which is the good one : Samba Printer Port or \\MYSRV\nss... ? How is it 
possible to change it ?

--->
# rpcclient MYSRV -U root%ROOTPASSWD -c "enumprinters 2"
INFO: Debug class all level = 1   (pid 32337 from pid 32337)
session setup ok
Domain=[MYDOM] OS=[Unix] Server=[Samba 2.2.3a-12.3 for Debian]
cmd = enumprinters 2
enumprinters 2
        servername:[\\MYSRV]
        printername:[\\MYSRV\nss.rdc]
        sharename:[nss.rdc]
        portname:[Samba Printer Port]
        drivername:[HP LaserJet 4050 Series PS]
        comment:[Partage imprimante HP4050N (1er etage)]
        location:[]
        sepfile:[]
        printprocessor:[WinPrint]
        datatype:[RAW]
        parameters:[]
        attributes:[0x18]
        priority:[0x1]
        defaultpriority:[0x1]
        starttime:[0x0]
        untiltime:[0x0]
        status:[0x0]
        cjobs:[0x0]
        averageppm:[0x0]
        Revision:[1]
        Owner SID: .....
                ....
        servername:[\\MYSRV]
        printername:[\\MYSRV\nss.1er]
        sharename:[nss.1er]
        portname:[\\MYSRV\nss.1er]
        drivername:[HP LaserJet 4000 Series PCL6]
        comment:[Partage imprimante HP4000N (2eme etage)]
        location:[]
        sepfile:[]
        printprocessor:[WinPrint]
        datatype:[RAW]
        parameters:[]
        attributes:[0x1059]
        priority:[0x1]
        defaultpriority:[0x0]
        starttime:[0x0]
        untiltime:[0x0]
        status:[0x0]
        cjobs:[0x0]
        averageppm:[0x0]
        Revision:[1]
        Owner SID: ....
                ....
---> END of rpcclient's enumprinters command.


3.) 
I have notice, that the rpcclient's enumprinters command, lists the 
'location', 'sepfile' and 'parameters' fields as blank. What does these 
fields must contain ? How is it possible to change them ?


4.) 
I also used the rpcclient's enumdrivers but nothing was display. What this 
command really do ? What does it look for ?
--->
# rpcclient MYSRV -U root%ROOTPASSWD -c "enumdrivers"
INFO: Debug class all level = 1   (pid 5229 from pid 5229)
session setup ok
Domain=[MYDOM] OS=[Unix] Server=[Samba 2.2.3a-12.3 for Debian]
cmd = enumdrivers
enumdrivers
---> END of rpcclient's enumdrivers command.


5.) 
I have not define the samba 'add printer command' in the 'smb.conf' file. I 
know that it must be a script but I don't know what it must really do. I hope 
that this script must modify the 'printcap' file and also the 'smb.conf' file 
as we could do it manually if we want to add a new printer. Am I right ?


6.)
I have heared about the 'make_printerdef' samba command. When must I exactly 
use it ? Is it an automatic command or must I use it manually ?


I know that there is a lot of question but I want to know more on samba that 
we can found on the conventional documentation web site.
Thank you very much in advance for your help.
Best regards.
Vincent.
-- 
Mr FARGET Vincent
Universite Claude Bernard LYON 1
CNRS - UMR 5020
Laboratoire des Neurosciences et Systemes Sensoriels
50, avenue Tony Garnier
69366 LYON Cedex 07



More information about the samba mailing list