[Samba] smbprint to Win XP
Scott Lockwood
scott at cashnetusa.com
Thu Aug 17 00:24:56 GMT 2006
Why not just use cups?
-----Original Message-----
From: samba-bounces+scott=cashnetusa.com at lists.samba.org
[mailto:samba-bounces+scott=cashnetusa.com at lists.samba.org] On Behalf Of
Adam Williams
Sent: Wednesday, August 16, 2006 7:06 PM
To: terry at stribus.com
Cc: samba at lists.samba.org
Subject: Re: [Samba] smbprint to Win XP
i have a script called /usr/bin/printfilexp that contains:
#!/bin/sh
# Print from Unix on a printer on SMB network. An assumption is that #
'printer' was posted as a passwordless "share"
#
client="$USER" # client name here...
pshare="printer" # and here printer share name
printfile="/tmp/smbspool.$$"
cat $1 > $printfile
if [ -s $printfile ] ; then
( echo "translate" ; echo "print $printfile" ; echo "quit" ) \
| smbclient "//$client/$pshare" -U $USER fi rm -f $printfile exit 0
and to print something you just do /usr/bin/printfilexp whatever.txt
but your unix shell name has to be the same name as your windows xp computer
name under my computer and your printer has to be shared as printer on the
printer sharing tab.
Terry Orgill wrote:
> My server is running Centos 4. The printer is attached to a Win XP
> machine. Print service is CUPS. Samba version is 3.0.10. I can use
> smbclient to connect to the printer and successfully print. I have
> set the printer up with exactly the same settings as I am using with
> smbclient. When I use lpr to print nothing prints and when I do an
> lpstat I get the message: Connection failed with error
> NT_STATUS_UNSUCCESSFUL. Any ideas?
>
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba
More information about the samba
mailing list