Configuring Samba for Printing on WinXP Machine

2004-05-13 Thread Richard Liang
Hi,

I recently went through all of this with a Windows 2000 machine; I ended up 
doing it using Samba and CUPS.  Apparently there are ways to do it using lpd 
and apsfilter, but I think using CUPS is the cleanest solution.

Configuring Samba won't be too bad if you're only going to be accessing 
other shares, rather than setting up shares on the FreeBSD box.  In that 
case, not very much configuration is needed; only the smbclient and smbspool 
programs (these are the client programs that access other shares).  Get 
familiar with SWAT; it's a real nice tool and makes configuring Samba mostly 
painless.  Using SWAT, you can change the workgroup name that you want the 
FreeBSD box to access, and the NetBIOS name of the FreeBSD box.  Note that 
if you do want to set up Samba shares on your FreeBSD box, you'll need to 
set Encrypt Passwords to yes and use smbpasswd to maintain Samba's set of 
username/passwords that allow Windows users to access the FreeBSD shares.

First, make sure it works by generating a file that is ready to be sent 
direct to your printer.  By that I mean a file in your printer's native 
raster format.  You can do this using ghostscript and a postscript file (or, 
if your printer is already postscript, you can just send the postscript file 
directly).  Use smbclient to do this.  If it works, then your Samba 
configuration is good enough.

Next, you will need to create a symlink to the smbspool program in 
/usr/local/libexec/backend (this is where CUPS keeps all of the transport 
programs it uses to deliver jobs to the printers).  Once this is done, use 
the CUPS tools to add a Windows network printer using Samba.  It will ask 
for the name of the printer, and prompt you with smb:.  This is the name 
of the printer share.  In my experience you will also need to provide a 
username/password to CUPS in the name; this is the user account which all 
the printing will be done under.  I used the Guest account so that I 
wouldn't have my password in a file (albeit an unreadable file).  In any 
case then the full name you will have to put here is something like
smb://username:password@Windows machine name/printer share name
(Type smbclient -L Windows machine name to find all the available shares 
on this machine, using the -U option if your username is different on the 
FreeBSD and Windows boxes.)

From there you should be scot free from the parts concerning Samba.  
Potential gotchas:
1) if your printer is not natively supported by CUPS' drivers, you can use 
foomatic-db and foomatic-db-engine to generate a driver for your printer.  
Follow the documentation on www.linuxprinting.org to get the printing going 
in this scenario; note you will need to install the foomatic-rip script 
yourself (I couldn't find it in ports).

2) If you set up shares on your FreeBSD box, make sure you don't have LDAP 
support enabled when you compile.  I did by accident and it kept me from 
administering the Samba password file.

Another neat printing solution I found online, using only lpd, is outlined 
on this website:
http://www.freebsddiary.org/samba.php
It involves printing to a dummy fifo, then using smbspool to send the 
contents of the fifo to the printer.

Hope this helps,

Richard

_
STOP MORE SPAM with the MSN Premium and get 2 months FREE*
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=http://hotmail.com/encaHL=Market_MSNIS_Taglines

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Configuring Samba for Printing on WinXP Machine

2004-05-02 Thread Gerard Seibert
I am running FreeBSD 5.2.1. I have three computers networked together, Two
running WinXP Pro and one running FreeBSD. I would like the one running
BSD to be able to use the printer connected to the WinXP machine. I have
had no success in getting this to occur.

The WinXP machine in question is connected to a hub, then a router and
then to my cable modem. I do not want to make any changes to its network
so that it will fail to connect to the internet or to the other WinXP
computer. It would be a bonus if I could actually share files among all
three machines, but it is not a necessity. I do need the ability to print
though.

I have tried configuring Samba but without success. Perhaps someone could
give me some basic configuration tips, or perhaps another easier to use
and setup networking tool other than Samba.

Thanks in advance!

Gerard Seibert
[EMAIL PROTECTED]


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Configuring Samba for Printing on WinXP Machine

2004-05-02 Thread Tom Parquette
Gerard,
Which version of Samba are you using?
I am by no means an expert but I I have been reading the O'Reilly 
Samba book.  I understand that XP security is basedon Kerberos 5.
I believe you have to start with Samba V3.

All I have is a couple of Win98 boxes.  No XP.  You now know everything 
I do about Samba.  :-)

I hope someone with more experence can educate both of us.
Cheers...
Gerard Seibert wrote:
I am running FreeBSD 5.2.1. I have three computers networked together, Two
running WinXP Pro and one running FreeBSD. I would like the one running
BSD to be able to use the printer connected to the WinXP machine. I have
had no success in getting this to occur.
The WinXP machine in question is connected to a hub, then a router and
then to my cable modem. I do not want to make any changes to its network
so that it will fail to connect to the internet or to the other WinXP
computer. It would be a bonus if I could actually share files among all
three machines, but it is not a necessity. I do need the ability to print
though.
I have tried configuring Samba but without success. Perhaps someone could
give me some basic configuration tips, or perhaps another easier to use
and setup networking tool other than Samba.
Thanks in advance!

Gerard Seibert
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Configuring Samba for Printing on WinXP Machine

2004-05-02 Thread Joshua Lokken
* Gerard Seibert [EMAIL PROTECTED] [2004-05-02 14:11]:
 I am running FreeBSD 5.2.1. I have three computers networked together, Two
 running WinXP Pro and one running FreeBSD. I would like the one running
 BSD to be able to use the printer connected to the WinXP machine. I have
 had no success in getting this to occur.
 
This doesn't pertain *specifically* to XP, but:
(from
http://www.freebsd.org/doc/en_US.ISO8859-1/books/corp-net-guide/printserving-nt-
+and-freebsd.html)

[quote]
Following is a sample /etc/printcap file entry that defines a print
queue named tank on the FreeBSD system pointed to an NT LPD server queue
named sherman on a NT Server named big.army.mil in the DNS. This uses
the rm printcap capability. Unlike the earlier examples, the output
print jobs are sent out not by the PC parallel port but over the network
to the NT server.

#
tank|sample remote printer:\
  :rm=big.army.mil:rp=sherman:sd=/var/spool/output/lphost:\
  :lf=/var/log/lpd-errs:
#
[/quote]

HTH,
-- 
Joshua

Mmm Jar-Jar; everyone hates you, but me.
 -- Comic Book Guy

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Configuring Samba for Printing on WinXP Machine

2004-05-02 Thread Bob Johnson
On Sunday 02 May 2004 05:04 pm, Gerard Seibert Gerard Seibert 
[EMAIL PROTECTED] wrote:
 I am running FreeBSD 5.2.1. I have three computers networked
 together, Two running WinXP Pro and one running FreeBSD. I would like
 the one running BSD to be able to use the printer connected to the
 WinXP machine. I have had no success in getting this to occur.


If all you need is printing, and not file sharing, then CUPS should do 
what you need.  It can be a little confusing to get it up and running, 
but probably not as confusing as Samba. 

/usr/ports/print/cups


 The WinXP machine in question is connected to a hub, then a router
 and then to my cable modem. I do not want to make any changes to its
 network so that it will fail to connect to the internet or to the
 other WinXP computer. It would be a bonus if I could actually share
 files among all three machines, but it is not a necessity. I do need
 the ability to print though.

If you decide to use CUPS for printing, you may be able to do adequate 
file sharing by using the basic SMB networking built in to recent 
versions of FreeBSD (see mount_smbfs(8) and smbutil(1)).  That should 
let you be a client to the WinXP file servers, although you won't be 
able to serve files to them.  smbutil claims to be able to print to 
Windows shared printers, but I've never tried it, and I suspect that 
drivers would be an issue. 

When I use mount_smbfs to mount shares from my wife's XP Home system, I 
have to try the mount twice: it times out the first time, and works on 
the second.  I haven't tried to debug that yet...

I haven't used Samba in a few years, but when I did, its primary role 
was to act as a Windows server, not as a client.  The client (at least 
back then) was very limited.


 I have tried configuring Samba but without success. Perhaps someone
 could give me some basic configuration tips, or perhaps another
 easier to use and setup networking tool other than Samba.

 Thanks in advance!

 Gerard Seibert
 [EMAIL PROTECTED]


 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 [EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Configuring Samba for Printing on WinXP Machine

2004-05-02 Thread Warren Block
On Sun, 2 May 2004, Gerard Seibert wrote:

 I am running FreeBSD 5.2.1. I have three computers networked together, Two
 running WinXP Pro and one running FreeBSD. I would like the one running
 BSD to be able to use the printer connected to the WinXP machine.

I think Joshua has the easy approach to this: load Windows Printing
Services For Unix on the XP machine.  That gives it a reasonably
standard lpd server.  (XP Home may not have this, don't know for sure.)

Then set up an entry in /etc/printcap pointing at the XP computer.
I think the XP system will send it through whatever drivers you have
defined for that printer.

smbclient has some printing capabilities, too, but then you may have to
deal with user passwords on XP.

-Warren Block * Rapid City, South Dakota USA
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]