Printing - Samba-VMS V2.0.6

John E. Malmberg wb8tyw at qsl.net
Thu Jun 13 01:40:28 GMT 2002


Chris Smith <chris at vspl.co.unitedkingdom> wrote:
 >
 > I'm still tearing my hair out here trying to get printing to work
 > via Samba-VMS 2.0.6
 >
 > I couldn't get printing to work under 2.0.3 so I found the Freeware
 > CDs distributed with OpenVMS 7.3 and installed a fresh copy of Samba
 > 2.0.6 and still printing won't work.
 >
 > Alpha 1200 2 x 533 21164 processors OpenVMS 7.2 TCPIP V5something
 >
 > I have 2 remote printers set up in printcap.dat which work fine from
 > the command prompt in VMS. Both printers are visible from my Win98
 > PC and when I try to print anything from Win98 to either printer the
 > spool file appears in SAMBA_ROOT:[VAR] But thats as far as it ever
 > gets. The spool file remains in that directory and no output appears
 > at the printer. If I emulate the 'print command =' line from
 > SMB.CONF at the command line as SYSTEM in VMS the correct output is
 > printed.
 >
 > In addition, strange files with names like LPQ.001B30C5 appear in
 > VERY large numbers especially if the printer status window is left
 > running on the PC. These are text files which read 'LJ is running'
 > for example.
 >
 > The contents of SAMBA_ROOT:[VAR]SMB.LOG is not very enlightening
 > except for the entry:
 >
 > [2002/06/11 13:56:36, 1]
 > CMS_ROOT:[SAMBA.SOURCE.SMBD]SERVICE.C;2:(535) chris (192.168.1.10)
 > connect to service LJ as user chris (uid=4194368, gid=64) (pid=288)
 >
 > where the uid appears to be my VMS uid (64) multiplied by 65536 +
 > gid (64). Preumably this is the VMS uid/gid as a 32-bit word instead
 > of 2 x 16-bit words.

Yes, that was how Frontport maps VMS UID to UNIX UID behavior.

 > I'm not using encrypted passwords and all file shares are visible
 > and accessible.

That is encouraging.

 > So what am I doing wrong?

Not sure yet.


 > The entire un-commented contents of SMB.CONF follow:
 >
 > [global]
[edited]

 > printing = bsd
I think this is ignored for now.

 > printcap name = /sys$sysroot/tcpip$lpd/tcpip$printcap.dat
 > print command = print %s /queue=%p /delete/name=SAMBA_PRINT
 > lppause command = samba_lppause %p %j
 > lpresume command = samba_lpresume %p %j
 > lpq command = samba_lpstat %p
 > lprm command = samba_lprm %p %j
 > load printers = yes
 > socket options = SO_RCVBUF=8192 SO_SNDBUF=8192 SO_KEEPALIVE

 > [printers] comment = All Printers
 > browseable = no
 > printable = yes
 > public = yes
 > writable = no
 > create mode = 0700
 > path = /tmp

In my tests, I did not have a "path" setting in the smb.conf file.

 > Please can someone throw some light on this?

I can try.

 >
 > Message: 2
 >
 > I still can't get Samba-VMS V2.0.6 to unspool the files it puts in
 > the /tmp directory to any printer in printcap.dat.
 >
 > However I have discovered something disturbing about the smb.conf
 > file. Samba appears to ignore the 'print command =' line completely.
 > I can put anything in this line and it will be quietly ignored so I
 > have been unable to implement a debug procedure suggested to me by
 > Tadgh O'Sullivan. He suggested writing a small command procedure to
 > capture the parameters to the print command by replacing the print
 > command with:
 >
 > print command = @/some/where/print.com %f %s %p


Samba for OpenVMS 2.0.6 passes all commands as parameters to
SAMBA_ROOT:[BIN]VMS_SMBRUN.COM.

VMS_SMBRUN.COM makes sure that the command is run in the correct user
security context.

But this also places restrictions on what commands can be sent.

Perhaps you have a global symbol defined for PRINT that is changing the
behavior of the print command so that it no longer works?

 > I tried this and was intrigued to find that no attempt was made to
 > run the command procedure.  Not only was the procedure not run but
 > the spool file was still created and placed in /tmp.

If you got the spool file, then most of the stuff is working.  Small
modifications to the VMS_SMBRUN will probably reveal the answer.

 > Looks like I may have to resort to delving into the source code
 > unless anyone can suggest why the spool files are not being
 > unspooled to a printer.

I strongly suspect a redefined symbol for PRINT.

-John
wb8tyw at qsl.network
Personal Opinion Only





More information about the samba-vms mailing list