[Samba] Samba printer name != cups printer name

Gary Algier gaa at ulticom.com
Wed Dec 8 21:45:34 GMT 2004


I recently added a printer to cups and the samba name is wrong.

Anyone know how I can fix it?

Environment:
    OS: Red Hat Enterprise Linux ES release 3 (Taroon Update 3)
    Uname: Linux stilton.ulticom.com 2.4.21-20.EL #1 Wed Aug 18 20:58:25 EDT 2004 i686 i686 i386 GNU/Linux
    Samba: samba-client-3.0.4-6.3E samba-common-3.0.4-6.3E samba-3.0.4-6.3E
    Cups: cups-libs-1.1.17-13.3.16 cups-devel-1.1.17-13.3.16 cups-1.1.17-13.3.16

/etc/smb.conf:
     [global]
         workgroup = MTLAUREL
         netbios name = PRINT
         server string = Print Server
         printcap name = cups
         load printers = yes
         printing = cups
         log file = /var/log/samba/%m.log
         log level = 0
         max log size = 50
         security = user
         encrypt passwords = yes
         socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
         local master = no
         dns proxy = no
         ldap admin dn = "uid=sambaAdmin,ou=Directory Administrators,dc=ulticom,dc=com"
         ldap ssl = off
         passdb backend = ldapsam_compat:ldap://ldap.ulticom.com
         ldap delete dn = no
         ldap user suffix = ou=people
         ldap group suffix = ou=group
         ldap machine suffix = ou=computers
         ldap suffix = dc=ulticom,dc=com
         ldap filter = (uid=%u)
         ldap passwd sync = no
     [printers]
         comment = All Printers
         path = /var/spool/samba
         browseable = no
         public = no
         guest ok = no
         writable = no
         printable = yes
         printer admin = root, @it
     [print$]
         comment = Printer Driver Download Area
         path = /var/samba/printers
         browseable = no
         guest ok = no
         read only = yes
         write list = root, @it
         force group = +it
         map archive = no
         map hidden = no
         map system = no
         force directory mode = 02775
         force create mode = 0664
         directory mask = 02775
         create mask = 0664

Section of /etc/cups/printers.conf:
     <Printer fulllj2420>
     DeviceURI socket://fulllj2420:9100
     State Idle
     Accepting Yes
     JobSheets none none
     QuotaPeriod 0
     PageLimit 0
     KLimit 0
     </Printer>

As cups knows the printer:
     % lpstat -a | grep 2420
     fulllj2420 accepting requests since Jan 01 00:00

As samba knows the printer:
     % rpcclient -c 'enumprinters' -Uroot print |grep -B2 2420
         flags:[0x800000]
         name:[\\print\HP LaserJet 2420 PS]
         description:[\\print\HP LaserJet 2420 PS,HP LaserJet 2420 PS,HP LaserJet 2420dn]
         comment:[HP LaserJet 2420dn]

The windows world sees the same name as rpcclient.

I have restarted cups, I have restarted samba.  I have deleted the printer from cups and restarted
both.  The printer goes away ok.  If I re-add it to cups and restart samba, the bad name comes back.

I notice there is no "deleteprinter" command in rpcclient, so that won't work.  How can I fix
this?  I can't have the model name be the printer name, I have a second printer of the same type
to setup.

I have 30 printers setup just fine.  The cups name == the samba name.  Just this latest one
messed up.

BTW: I can't upgrade Samba as the newer releases from Red Hat don't support ldapsam_compat
(this has been reported as a bug to them).

-- 
Gary Algier, WB2FWZ          gaa at ulticom.com             +1 856 787 2758
Ulticom Inc., 1020 Briggs Rd, Mt. Laurel, NJ 08054      Fax:+1 856 866 2033

Nielsen's First Law of Computer Manuals:
     People don't read documentation voluntarily.


More information about the samba mailing list