[SOLVED] Can't print to Windows printer, suspect Samba issue
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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Can't print to Windows printer, suspect Samba issue
I've been trying to fix the printing on my Arch netbook and laptop for a while, and I'm stuck. There is a HP Photosmart printer attached to a Windows XP desktop that I would like to print to. I have a Debian server that has no problem printing to it.
When I try to add the printer, I use the exact same device URI that I used for the Debian box. The CUPS web interface tells me that it's a bad device URI.
I haven't managed to get Samba to actually run on the Arch computers, and I can't figure out why. All I did was comment out the default shares in the smb.conf. Testparm shows that the file is OK. However, when I try to start the service, it gives this error:
[anthony@anthony-eee ~]$ systemctl status samba -l
● samba.service - Samba AD Daemon
Loaded: loaded (/usr/lib/systemd/system/samba.service; disabled)
Active: failed (Result: exit-code) since Fri 2014-10-31 22:07:14 EDT; 46s ago
Process: 26494 ExecStart=/usr/bin/samba $SAMBAOPTIONS (code=exited, status=0/SUCCESS)
Main PID: 26495 (code=exited, status=1/FAILURE)
Oct 31 22:07:14 anthony-eee samba: [2014/10/31 22:07:14.657008, 0] ../source4/smbd/server.c:370(binary_smbd_main)
Oct 31 22:07:14 anthony-eee samba: samba version 4.1.12 started.
Oct 31 22:07:14 anthony-eee samba: [2014/10/31 22:07:14.815088, 0] ../source4/smbd/server.c:475(binary_smbd_main)
Oct 31 22:07:14 anthony-eee samba: At this time the 'samba' binary should only be used for either:
Oct 31 22:07:14 anthony-eee samba: 'server role = active directory domain controller' or to access the ntvfs file server with 'server services = +smb' or the rpc proxy with 'dcerpc endpoint servers = remote'
Oct 31 22:07:14 anthony-eee samba: You should start smbd/nmbd/winbindd instead for domain member and standalone file server tasks
Oct 31 22:07:14 anthony-eee samba: [2014/10/31 22:07:14.815915, 0] ../lib/util/become_daemon.c:124(exit_daemon)
Oct 31 22:07:14 anthony-eee samba: STATUS=daemon failed to start: Samba detected misconfigured 'server role' and exited. Check logs for details, error code 22
Oct 31 22:07:14 anthony-eee systemd: samba.service: main process exited, code=exited, status=1/FAILURE
Oct 31 22:07:14 anthony-eee systemd: Unit samba.service entered failed state.
Another reason that I suspect that samba is the issue is the output of smbtree. On my Debian machine, it properly lists all of the shares of all the machines:
Enter anthony's password:
\\PANTHERSPRIDE\Printer Microsoft XPS Document Writer
\\PANTHERSPRIDE\C$ Default share
\\PANTHERSPRIDE\N$ Default share
\\PANTHERSPRIDE\ADMIN$ Remote Admin
\\PANTHERSPRIDE\Printer2 Microsoft Office Document Image Writer
\\PANTHERSPRIDE\HPPhotosmart C4200 HP Photosmart C4200 series
\\PANTHERSPRIDE\M$ Default share
\\PANTHERSPRIDE\print$ Printer Drivers
\\PANTHERSPRIDE\IPC$ Remote IPC
\\MAPLES-SERVER maples-server server
\\MAPLES-SERVER\IPC$ IPC Service (maples-server server)
\\MAPLES-SERVER\srv Server Files
\\ANTHONY-EEE\IPC$ IPC Service (Netbook)
However, the netbook only lists the machines, but not any of the shares:
[anthony@anthony-eee ~]$ smbtree
Enter anthony's password:
\\MAPLES-SERVER maples-server server
The smb.conf of the netbook:
server string = Netbook
log file = /var/log/samba/%m.log
max log size = 50
printcap name = /etc/printcap
dns proxy = No
idmap config * : backend = tdb
I'm inclined to agree with allend with regards to using alternative remote printing protocols (ie IPP or LPD). (However, if you decide to pursue samba printing, then you should compare your working Debian smb.conf with the Arch smb.conf.)
I checked with the Arch wiki link that you provided. The symlink was already in place. I checked the device URI that it suggested, and it didn't work either. (I've been doing "smb://PANTHERSPRIDE/HPPhotosmart C4200", without the quotes. Changing it to "smb://Windows Username@PANTHERSPRIDE/HPPhotosmart C4200" didn't help. Windows is setup not to need a password.) It still keeps giving this error:
Bad device-uri "smb://PANTHERSPRIDE/HPPhotosmart C4200".
I tried replacing PANTHERSPRIDE with the IP of the XP desktop (it has a static IP), and that didn't help either.
You mentioned using other printing methods. How would I go about setting those up?
[anthony@newerLaptop ~]$ lpinfo -v
[anthony@newerLaptop ~]$ dir /usr/lib/cups/backend/
dnssd hp hpfax http https ipp ipps lpd parallel serial smb snmp socket usb
I just reinstalled the package smbclient, and after restarting cups there was still no change.
I checked the Arch Wiki page again. The desktop is running Windows XP, but I tried it anyway with LPD. I replaced smb with lpd, and I still got a bad device URI error.
I'm not sure if I want to add an additional service to run the IPP server for the XP machine. It's my parents' computer, and it's slow enough as it is...
I manage to make it work, though. Since the Debian computer could print with no problem, I enabled printer sharing on the Debian box and pointed the Arch computers to print through it. It's a roundabout way, but it works.