Problem
How can I print from a UnixWare 7.1.4, OpenServer 6.0.0 and OpenServer 5.0.7 server running Samba 3 to a Windows shared printer?
NOTE: This TA assumes you are running the latest supported version
of Samba 3. The latest supported version of Samba 3 for
OpenServer 6, UnixWare 7.1.4 and OpenServer 5.0.7 are
available to download at:http://www.sco.com/support/download.html Solution
This TA assumes that your Samba 3 server is already installed and configured.
The example below is based on the following configuration:
A Windows XP PC called winXP user name: test user password : sco123 windows printer share name: HPJet5550 ((Name of the Windows printer you want to share)
To configure the Windows printer as a Samba printer, as root:
1) If you are using OpenServer 6.0.0 or OpenServer 5.0.7 copy the smbprint.sysv printer interface script as follows:
# cp /usr/share/doc/packages/samba/examples/printing/smbprint.sysv /localand change the following lines:#!/bin/sh
server=winXP
service=HPJet5550
user=test
password=sco1232) If you are using UnixWare 7.1.4 then using your favourite editor create a file called:
/local/smbprint.sysvwith the following content:#!/bin/sh
server=winXP
service=HPJet5550
user=test
password=sco123(
# NOTE You may wish to add the line `echo translate' if you want automatic
# CR/LF translation when printing.
echo translate
echo "print -"
cat $*
echo "\f"
) | /usr/bin/smbclient "\\\\$server\\$service" $password -U $user >
/dev/null 2>&1
exit $?3) Make sure using either DNS or /etc/hosts that the SCO Server can ping the Windows XP PC.
4) On the SCO Server create the printer using the command:
lpadmin -p dj5550 -v /dev/null -i /local/smbprint.sysv5) Enable the printer and configure it to accept print jobs using:
# enable dj5550
# accept dj55506) You can veirfy the status of the printer using:
# lpstat -t7) Now you can print to the windows shared printer via samba smbclient:
# lp -d dj5550 /etc/hosts See also
TA# 119726: How do I configure Samba on my SCO Unix server?
man page for lpadmin(1M) and lpadmin(ADM)