LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't print from win2k to Fedora w/Samba + CUPS (https://www.linuxquestions.org/questions/linux-newbie-8/cant-print-from-win2k-to-fedora-w-samba-cups-140883/)

WarrenWright 01-31-2004 11:46 PM

Can't print from win2k to Fedora w/Samba + CUPS
 
Hi all,

I'm running Fedora, and have an HP Deskjet 3820 hooked up to it. I can print from my Fedora server perfectly.

I've spent quite a lot of time today configuring samba to allow my wife's WinXP laptop and my Win2k laptop to print on this HP 3820 that is attached to my Fedora box. I'm using a netbios name of "Samba_Server" for the Fedora box.

I've made progress, but gotten stuck. From the windows laptops I can browse to \\Samba_Server and access the shared folders without issue. I can also see the shared hp_deskjet_3820 printer and connect to it.

However, if I try to print on the 3820 from a windows laptop the test page never prints, and I get error messages in my samba log files. Here is an excerpt:

Quote:

[2004/01/31 22:30:35, 1] smbd/ipc.c:api_fd_reply(284)
api_fd_reply: INVALID PIPE HANDLE: 703f
[2004/01/31 22:32:47, 0] passdb/pdb_smbpasswd.c:build_sam_account(1179)
build_sam_account: smbpasswd database is corrupt! username pcguest with uid 0 is not in unix passwd database!
[2004/01/31 22:32:47, 1] auth/auth_util.c:make_server_info_sam(818)
User pcguest in passdb, but getpwnam() fails!
[2004/01/31 22:33:03, 0] passdb/pdb_smbpasswd.c:build_sam_account(1179)
build_sam_account: smbpasswd database is corrupt! username pcguest with uid 0 is not in unix passwd database!
[2004/01/31 22:33:03, 1] auth/auth_util.c:make_server_info_sam(818)
User pcguest in passdb, but getpwnam() fails!
[2004/01/31 22:33:03, 0] smbd/service.c:make_connection(850)
w4530010-2 (192.168.2.5) couldn't find service ::{2227a280-3aea-1069-a2de-08002b30309d}
lpr: unable to print file: client-error-document-format-not-supported
I see 2 problems in the log. The first, and maybe the biggest, is the complaints about pcguest. The second, the message that actually occurs when I try to print the test page, is the "client-error-document-format-not-supported" message.

My non-administrative account on the fedora box is "warren", and I've added a line like "warren = sx020ww" to /etc/samba/smbusers. I'm not sure if that is necessary or useful....sx020ww is the use account I'm using on my win2k laptop.

To summarize, I've followed several online documents on how to set this up by editing the smb.conf file. I'm able to access shared directories on the linux box. I'm able to browse to and see the HP 3820 printer from my windows laptops, but can't print test files (or any other file).

Thanks for any direction you can give me. I'm really enjoying my first linux installation, particularly the rich command line (compared to DOS), but this is the first major issue that has driven me up the wall a bit.

Regards,

Warren Wright
Dallas, Texas

swiftnet 02-01-2004 12:46 AM

Ok,

The best way to connect to a samba printer from WinNT5 (2k/XP) is to select a local port and type in the url:

\\samba_server\theprinter

Windows NT5 can print directly to the cups server, thus bypassing samba. It is http printing in WIndows speak. This is preferred method.

WarrenWright 02-01-2004 10:35 AM

Quote:

Originally posted by swiftnet
The best way to connect to a samba printer from WinNT5 (2k/XP) is to select a local port and type in the url:

\\samba_server\theprinter

Windows NT5 can print directly to the cups server, thus bypassing samba. It is http printing in WIndows speak. This is preferred method.

Alright. So, under Win2k, I entered the "Add Printer" wizard, and instead of type the printer name directly I selected the "Connect to Printer on your intranet or the internet" option and typed in \\Samba_Server\hp_deskjet_3820.

Now, when viewing my printers it shows that one, but says "Access denied, unable to connect". Further, if I try to print a test page I get the following messages in the CUPS error_log file:

Quote:

E [01/Feb/2004:09:24:01 -0600] print_job: Unsupported format 'application/octet-stream'!
I [01/Feb/2004:09:24:01 -0600] Hint: Do you have the raw file printing rules enabled?
Thanks for any help,

Warren

swiftnet 02-01-2004 02:39 PM

What you need to do is add printer/use a local port/then type in the url. Do not choose a network printer. Printing directly to cups is the better option, printing to samba is really only necessary when you jhave 9x clients, although it (samba) will work with all versions of networked Windows.

WarrenWright 02-02-2004 03:34 PM

Any recommended documents or sites that provide explanations of how to configure CUPS and any other necessary machine permissions to allow this?

I tried choosing local printer, then local host, then using the URL http://Samba_Server/hp_deskjet_3820, but still get the errors listed above.

Perhaps there is further CUPS configuration needed.

Also, what machine-wide permissions need to be set? Aren't there permissions that determine which machines are allowed to access printers through CUPS?

Thanks,

Warren Wright
Dallas

WarrenWright 02-02-2004 03:35 PM

As an addendum to the above post, I have searched and am searching for good documents on this over the web, but most of the good documents I find try to address print sharing through SAMBA.

Warren

swiftnet 02-02-2004 10:36 PM

For clarity: Connecting directly to Cups bypasses Samba. First I'll show how to connect the samba printer, next I linked two articles with info on connecting W2k PC's directly to Cups.

Connecting to a printer via samba:

add printer/select local port/new port/enter the printer url (//sambaserver/printername)
these lines should be in the smb.conf ( I snipped 'em out from a generic smb.conf)

Global
# if you want to automatically load your printer list rather
# than setting them up individually then you'll need this
printcap name = cups
load printers = yes
printing = cups
printer admin = @adm

Shares
[printers]
comment = All Printers
path = /var/spool/samba3
browseable = no
# to allow user 'guest account' to print.
guest ok = yes
writable = no
printable = yes
create mode = 0700
# =====================================
# print command: see above for details.
# =====================================
print command = lpr-cups -P %p -o raw %s -r # using client side printer drivers.

Below is the preferred method:


To Connect Windows Computers to Cups Print Server (via internet printing)

http://networking.earthweb.com/netse...0951_2236011_2

or

http://www-jerry.oit.duke.edu/commun...p_printer.html


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