Technical article 127012

How can I print from a UnixWare 7.1.4, OpenServer 6.0.0/5.0.7 server running Samba 3 to a Windows shared printer?

OpenServer 6.0.0OpenServer 5.0.7UnixWare 7.1.4

Written · Last revised

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 /local
and change the following lines:
#!/bin/sh
server=winXP
service=HPJet5550
user=test
password=sco123

2) If you are using UnixWare 7.1.4 then using your favourite editor create a file called:

/local/smbprint.sysv
with 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.sysv

5) Enable the printer and configure it to accept print jobs using:

# enable dj5550
# accept dj5550

6) You can veirfy the status of the printer using:

# lpstat -t

7) 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)

From the Xinuos technical article database, record 127012. Reproduced with permission. The original is at www.sco.com/ta/127012, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.