Click to See Complete Forum and Search --> : Manual Samba Printer Setup
Suminigashi
11-20-2003, 08:02 PM
I was wondering if there was a way to setup up the samba config file by hand in order to get a printer on a networked windows box to work. I switched from RedHat to Slackware and under RedHat all I did was use the printer config they provided in order to set it up. I tried to get the the redhat-config-printer for slackware but it needed **way** to many dependencys and I decide I wanted to try it a different way. Please let me know if you have any information or links on how to do this.
Thanks
-Suminigashi
you dont need to set up anything in samba if you want to be a client and connect to another box that is a server.
you can just do it in your cups set up.
Suminigashi
11-20-2003, 08:09 PM
So how do I go about doing that....I've never messed with cups directly. I've only used the redhat-config-printer app.
there are a bunch of posts on cups already. try searching first. also - check the JL help files/library.
Suminigashi
11-20-2003, 08:15 PM
Alright, I'll look into it....I'll check back if I have any problems.
Modorf
11-20-2003, 08:26 PM
open cups admin tool
http://127.0.0.1:631/admin/
Then add printer,
give the printer a name,
pick the device, Windows Printer via SAMBA,
path too printer (ie smb://myWinBox/HP4 )
then pick the correct driver for it.
(ie, HP LaserJet 4)
That should be it,
If your missing the device option then (Windows Printer via SAMBA),
ln -s `which smbspool` /usr/lib/cups/backend/smb
Modorf
11-20-2003, 08:27 PM
More on the subject,
http://www.linuxprinting.org/kpfeifle/SambaPrintHOWTO/Samba-HOWTO-Collection-3.0-PrintingChapter-11th-draft.html#39
8.2. Printing from CUPS to Windows attached Printers
From time to time the question arises, how you can print to a Windows attached printer from Samba. Normally the local connection "Windows host <--> printer" would be done by USB or parallel cable. But this doesn't matter to Samba. From here only a SMB connection needs to be opened to the Windows host. Of course, this printer must be "shared" first. As you have learned by now, CUPS uses "backends" to talk to printers and other servers. To talk to Windows shared printers you need to use the "smb" (surprise, surprise!) backend. Check if this is in the CUPS backend directory. This resides usually in /usr/lib/cups/backend/. You need to find a "smb" file there. It should be a symlink to smbspool . And this smbspool must exist and be executable:
kde-bitshop:~# ls -l /usr/lib/cups/backend/
total 253
drwxr-xr-x 3 root root 720 Apr 30 19:04 .
drwxr-xr-x 6 root root 125 Dec 19 17:13 ..
-rwxr-xr-x 1 root root 10692 Feb 16 21:29 canon
-rwxr-xr-x 1 root root 10692 Feb 16 21:29 epson
lrwxrwxrwx 1 root root 3 Apr 17 22:50 http -> ipp
-rwxr-xr-x 1 root root 17316 Apr 17 22:50 ipp
-rwxr-xr-x 1 root root 15420 Apr 20 17:01 lpd
-rwxr-xr-x 1 root root 8656 Apr 20 17:01 parallel
-rwxr-xr-x 1 root root 2162 Mar 31 23:15 pdfdistiller
lrwxrwxrwx 1 root root 25 Apr 30 19:04 ptal -> /usr/local/sbin/ptal-cups
-rwxr-xr-x 1 root root 6284 Apr 20 17:01 scsi
lrwxrwxrwx 1 root root 17 Apr 2 03:11 smb -> /usr/bin/smbspool
-rwxr-xr-x 1 root root 7912 Apr 20 17:01 socket
-rwxr-xr-x 1 root root 9012 Apr 20 17:01 usb
kde-bitshop:/etc/samba/tmp # ls -l `which smbspool`
-rwxr-xr-x 1 root root 563245 Dec 28 14:49 /usr/bin/smbspool
If this symlink doesn't exist, create it:
kde-bitshop:~# ln -s `which smbspool` /usr/lib/cups/backend/smb
smbspool has been written by Mike Sweet from the CUPS folks. It is included and ships with Samba. (It may also be used with other print subsystems than CUPS, to spool jobs to Windows printer shares.). To set up printer "winprinter" on CUPS, you need to have a "driver" for it. Essentially this means to convert the print data on the CUPS/Samba host to such a format the printer can digest. (The Windows host is unable to convert any files you may send.) This also means you should be able to print to the printer if it where hooked directly at your Samba/CUPS host. (For troubleshooting purposes, this is what you should do, to determine if that part of the process chain is in order. Then proceed to fix the network connection/authentication to the Windows host, etc.).
To install a printer with the smb backend on CUPS, use this command:
kde-bitshop:~# lpadmin -p winprinter -v smb://WINDOWSNETBIOSNAME/printersharename -P /path/to/PPD
The "PPD" must be fit to direct CUPS to generate the print data for the target model. (For PostScript printers just use the PPD that would be used with the Windows NT PostScript driver). But what to do, if the printer is only accessible with a password? Or if the printer's host is part of another workgroup? This is provided for: then you can include the required parameters as part of the "smb://" device-URI. Like this:
smb://WORKGROUP/WINDOWSNETBIOSNAME/printersharename
smb://username:password@WORKGROUP/WINDOWSNETBIOSNAME/printersharename
smb://username:password@WINDOWSNETBIOSNAME/printersharename
Note that the device-URI will be visible in the process list of the Samba server (f.e. when someone uses the "ps -aux" command on Linux), even if the username and passwords are sanitized before they get written into the log files. So this is an inherently insecure option. It is the only one. Don't use it if you want to protect your passwords. Better share the printer in a way that doesn't require a password! Printing will only work if you have a working netbios name resolution up and running. (You don't necessarily need to have smbd running -- but who wants that? :-)
Suminigashi
11-21-2003, 07:02 PM
I was getting ready to try the information you sent me modorf, but there is no smb file in my cups backend directory. What do I need to do...create one myself?
Modorf
11-22-2003, 01:41 AM
That should be it,
If your missing the device option then (Windows Printer via SAMBA),
ln -s `which smbspool` /usr/lib/cups/backend/smb
Suminigashi
11-22-2003, 03:29 PM
Thanks for the info...I'll try it later when I get the chance.
Suminigashi
11-22-2003, 04:02 PM
I created that symlink and used the command to add the printer just like the instructions said on the website and after trying numerous times I always get the same error.
lpadmin: add-printer (set device) failed: client-error-not-possible
What does that mean?
Modorf
11-22-2003, 08:15 PM
did you start the cups demon, cupsd
also did you work through the short et of instructions I put together on my first posting for using the cups web admin?
N
Suminigashi
11-22-2003, 10:32 PM
Ok the program says everything is set up ok, but when I get to this screen nothing comes out of the printer. I tried printing the test page numerous times but it does not work.
Cups Screenshot (http://members.cox.net/suminigashi/cups.png)