[Samba] Problem adding printer using MSRPC
Guruswamy Namasivayam (gnamasiv)
gnamasiv at cisco.com
Tue Sep 13 06:04:18 GMT 2005
Hi,
When I try to add a printer using APW, the printer gets added
successfully. However, when I try to add a printer using the MS_RPC
addprinter command, the script fails with access denied. Please let me
know if I am doing anything wrong.
Thanks,
Guru.
The addprinter vbscript
dim oMaster, oPrinter
set oMaster = CreateObject("PrintMaster.PrintMaster.1")
set oPrinter = CreateObject("Printer.Printer.1")
oPrinter.ServerName = "\\abc.xyz.com"
oPrinter.PrinterName = "Apple"
oPrinter.DriverName = "Apple LaserWriter 8500"
oPrinter.PortName = "Samba printer port"
oPrinter.shareName = "Apple"
oPrinter.Location = "odi-lab"
oMaster.PrinterAdd(oPrinter)
smb.conf
[global]
idmap uid = 70000-200000
idmap gid = 70000-200000
winbind enum users = no
winbind enum groups = no
winbind cache time = 10
winbind use default domain = yes
printcap name = cups
load printers = yes
printing = cups
cups options = "raw"
force printername = yes
lpq cache time = 0
log file = /local/local1/errorlog/samba.log
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
smb ports = 50139
local master = no
domain master = no
preferred master = no
dns proxy = no
template homedir = /local/local1/
template shell = /admin-shell
client schannel = no
printer admin = @printeradmin
addprinter command = /usr/bin/addprinter1.pl
guest account = nobody
map to guest = bad password
workgroup = <workgroup name>
netbios name = <netbios name>
wins server = <winsserver ip>
password server = <password server ip>
security = domain
[print$]
path = /state/samba/printers
guest ok = yes
browseable = yes
read only = yes
write list = @printeradmin
force user = root
force group = root
[printers]
comment = All Printers
path = /local/local1/spool/samba
browseable = no
guest ok = yes
writable = no
printable = yes
More information about the samba
mailing list