Guruswamy Namasivayam (gnamasiv)
2005-Sep-13 06:05 UTC
[Samba] Problem adding printer using MSRPC
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
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Guruswamy Namasivayam (gnamasiv) wrote:> 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)You're probably going to have to look at a level 10 smbd debug log to see what is failing. What error code is being returned? cheers, jerry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDMpKgIR7qMdg1EfYRAmf4AJ9hvYThW+pDtiM3ozo69Hh9qWppYwCfd/cE nXESiP7F/etHd90wTWSQp8o=54IP -----END PGP SIGNATURE-----
Seemingly Similar Threads
- Client driver installation
- PrintMaster 7.0 *nearly*, *very* nearly printing properly
- Users w/o acl access appear to be subscribed to public folders (1.1b8)
- coding volunteers needed for msrpc server-side API conversion
- Launching a windows executable so it's available to another .exe