LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   XP not able to use a Samba printer (https://www.linuxquestions.org/questions/linux-networking-3/xp-not-able-to-use-a-samba-printer-347266/)

feeble2 07-27-2005 08:37 AM

XP not able to use a Samba printer
 
Don't know how many posts I've browsed through, so It could be that my eyes just ceased functioning and I've missed the obvious solution. But I just can't get XP to print with a Samba printer.
The printer is Canon BJ S500 connected to a Debian Sarge computer. I've set up Samba in different ways, using webmin and manually editing smb.conf and cupsd.conf. I've set up machine accounts using smbpasswd -m -a, normal user accounts, allowed every action performed from another computer on any network... but I just can't get XP to print.

I've done everything according to Debian-and-Windows-Shared-Printing.html#sharing_with_windows (sorry for the incomplete URL, but I can't post complete URLs yet).
And I've added things like the workgroup setting. The XP machine can see the Linux machine, but with this setting, it cannot browse the printers, not even with the line browseable = yes.

Farthest I've gotten is when I use machine account, enable every possible action like guest login, writeable and other things. I can browse the printers, I can add them to the XP machine, and I can browse file shares and open the files. I've set the printer path so that everyone has all the rights to it. But on XP's printer control panel it says that the printer cannot be used, and the connection was refused.

I won't attach all the configurations I've tried. It is probably a simple, fool-proof way to set things up the right way, but I just screw everything up. So if anyone could just tell me, what should be the most basic way to get things working.

mpeg4codec 07-27-2005 07:55 PM

Note: I know for sure that Debian does it this way. I'm a Debian nerd, so no worries about disto incompatibilities.

When you try to connect from the XP machine, it will go into a log file in /var/log/samba/machinename.log . Try to browse the printers folder and copy the lines that get recorded in that file onto this forum.

As an aside, this is what a Samba configuration I know works has it in in the [global] section:

load printers = yes
printing = cups
printcap name = cups
cups options = "raw"
use client driver = no

This assumes you're using Cups. If you're not, install it! It will save you a ton of nightmares!

apt-get install cupsys-bsd

It has a web-based interface on port 631 that makes configuring printers a breeze.

feeble2 07-28-2005 07:02 PM

I got it working! Thank you! Much appreciated!

But there's still some problems... everything related to the printers is so slow. I can browse the shares on the Linux machine quite fast, but printing is slow, even choosing the printer from the printer list takes (too) long. It eventually prints, but it takes time.

I am currently testing with a user named user (and added valid users = user to global). And I've set XP so that when user connects to the Linux machine foo it uses the account user@foo for which I've set the same password on foo and on XP. If I try to browse the shares, to log.user (I have log. at the beginning, not at the end, set by webmin.) is added the following:

user (192.168.0.3) connect to service share initially as user user (uid=1001, gid=100) (pid 7147)

But if I try to do anything with the printers:

authorise_login: rejected invalid user nobody

Why does XP try to connect the shares using a username user, but when connecting to the printers it tries to do so as an anonymous guest?

Is this an XP configuration or a Samba configuration problem? Or both?

mpeg4codec 07-29-2005 08:46 AM

Things always seemed to speed up for me when I installed the printer drivers on the Samba machine. Add this line under use client driver = no:

printer admin = user

Add a share for printers just for good measure:

Code:

[printers]
        comment = Printers
        browseable = no
        writeable = yes
        printable = yes
        path = /tmp
        create mode = 0777

And add a share for the printer drivers. Make sure you give this directory proper permissions when you make it [should be owned by user:users and mode 755].

Code:

[print$]
        comment = Printer Drivers
        path = /var/lib/samba/drivers
        write list = user
        writeable = yes
        browseable = no
        create mask = 0644
        directory mask = 0755

Then, on the XP box, browse to the Samba machine. It should have a folder named Printers and Faxes in it. Right click on the printer you have drivers for and click properties. It will probably ask you to install the drivers, but say no. Now go to the advanced tab, click the button for New Driver, and install the driver. It will copy the driver to Samba's drivers folder.

Now, not only will printing be faster, but if you add the printer on another computer, it will automatically download the drivers. See if that solves your problem.


All times are GMT -5. The time now is 06:39 AM.