Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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?
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.
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?
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.
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)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.