Hi all,
I'm trying to add printers with cupsaddsmb on Samba 3.0.20 (Mandrake Linux)
with an LDAP backend. I've followed the howto on the samba page and have the
error:
result was WERR_INVALID_PRINTER_NAME
generated when I run it. So far I've Googled for the solution but nothing
listed has helped. The full set of errors are as follows:
Cupsaddsmb returns:
[root@h2lptserver etc]# cupsaddsmb -H SMB1 -h localhost -U BGS\\root -v -a
Password for BGS\root required to access SMB1 via SAMBA:
Running command: rpcclient SMB1 -N -U'BGS\root%xxxxxx' -c 'setdriver
HPCLaJet2550 HPCLaJet2550'
result was WERR_INVALID_PRINTER_NAME
rpcclient enumprinters returns:
[root@h2lptserver etc]# rpcclient -N -Uroot%xxxxxx -c enumprinters localhost
flags:[0x800000]
name:[\\h2lptserver\pdf-gen]
description:[\\h2lptserver\pdf-gen,,PDF Generator (only valid users)]
comment:[PDF Generator (only valid users)]
flags:[0x800000]
name:[\\h2lptserver\HPLaserjet2300]
description:[\\h2lptserver\HPLaserjet2300,,HP LaserJet 2300]
comment:[HP LaserJet 2300]
flags:[0x800000]
name:[\\h2lptserver\HPCLaJet2550]
description:[\\h2lptserver\HPCLaJet2550,hp color LaserJet 2550 PCL
6,HP Color LaserJet 2550]
comment:[HP Color LaserJet 2550]
smb.conf is:
[global]
workgroup = BGS
server string = Samba Server %v
printcap name = cups
load printers = yes
printcap cache time = 60
# printing = cups
log file = /var/log/samba/%m.log
max log size = 50
log level = 3
map to guest = bad user
security = domain
password server = SMB1
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
idmap uid = 10000-20000
idmap gid = 10000-20000
winbind use default domain = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
os level = 10
idmap backend = ldap:ldap://172.20.0.101
ldap admin dn = cn=Administrator,dc=mydomain,dc=sch,dc=uk
ldap suffix = dc=mydomain,dc=sch,dc=uk
name resolve order = wins lmhosts bcast
wins server = 172.20.0.101
dns proxy = no
dos charset = 850
unix charset = ISO8859-1
#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writable = yes
# vfs objects = fake_perms
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
# to allow user 'guest account' to print.
guest ok = yes
public = yes
writable = no
printable = yes
create mode = 0700
printer admin = adm,root,fred,bert,joe
# =====================================
# print command: see above for details.
# =====================================
# print command = lpr-cups -P %p -o raw %s -r # using client side printer
drivers.
print command = lpr-cups -P %p %s # using cups own drivers (use generic
PostScript on clients).
# use client driver = yes
[print$]
path = /etc/samba/drivers
browseable = yes
guest ok = yes
inherit permissions = yes
writeable = yes
write list = @"Domain Admins" @adm root fred,bert,joe
[pdf-gen]
path = /var/tmp
guest ok = No
printable = Yes
comment = PDF Generator (only valid users)
printing = bsd
#print command = /usr/share/samba/scripts/print-pdf file path win_path
recipient IP &
print command = /usr/share/samba/scripts/print-pdf "%s"
"%H" "//%L/%u"
"%m" "%I" "%J" &
lpq command = /bin/true
Thanks all,
Jools