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.
I'd like to print to a printer shared by a Windows box on my network. Right now I'm having problems even connecting to shares with smbclient due to firewall issues on his end, but if I'm able to resolve that, what do I need to do to print to that? I'm not very familiar with printing under Linux in the first place, and all the tutorials online don't seem to address the network printer issue. Even excluding graphical programs, how would I print a file from the command line? Thanks.
That site looks like exactly what I was looking for. The firewall is Symantec Client Firewall and it seems like it's configured properly. However, when I try to use smbclient to connect, I get the following:
added interface ip=IPHERE bcast=BCASTHERE nmask=NMASKHERE
session request to HISCOMPUTERNAME failed (Called name not present)
Domain=[MSHOME] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
tree connect failed: NT_STATUS_DUPLICATE_NAME
I'm not running samba currently... it was my understanding that you need it to let Windows hosts access shares on your machine but that you could do the reverse with something like smbclient without setting up smb.conf, etc. I've done this before (used smbclient to view and access the shares on a Windows box without having specifically set up a smb.conf), but I was connect to a Win98 instead of WinXP machine... maybe that makes a difference? If I'm misunderstanding something let me know.
Actually, it looks like using the IP address instead of the name might work (I still need to make some more changes to the firewall before I'm sure). I'd say that doesn't sound like it would make any difference, but I had a previous experience with smbclient where an IP failed and the name worked, so I'm not surprised. However, I was reading the link you gave me in more detail and I see now that I don't have a ppd for the printer. A quick search through sites like linuxprinting.org doesn't even list the printer (Dell Photo 720). Is there a "default" ppd I can use to get this to work, or will it not even be possible to print from Linux unless I have an exact ppd file for that particular printer? Thanks again.
Ok, now I can use smbclient -L //HISIP to view the shares and printer, but "lpadmin -p DefaultPrinter -v smb://HISIP/PRINTERNAME -P /usr/share/cups/model/stphoto.ppd" gives me "lpadmin: Unable to connect to server: Connection refused." What could be wrong?
Now I'm a little confused. In another post I thought I was told that the CUPS daemon only had to be running if you wanted your computer to act as a print server but that you could connect to other computers without it. Anyway, I typed "cupsd" and then tried it again, and I got a little further. I followed the instructions on that site (lpadmin, enable, accept) and didn't get any errors. However, when I tried to use lp or lpr to print a file, I get the following:
Status Information, attempt 1 of 3:
sending job 'root@MYUSERNAME+955' to DefaultPrinter@localhost
connecting to 'localhost', attempt 1
cannot open connection to localhost - No such file or directory
Make sure the remote host supports the LPD protocol
Waiting 10 seconds before retry
I'm a little confused why it's trying to use localhost, since I used the ip of the other computer in the lpadmin commands. What should I try now?
I originally did set up the backend but when I checked the symlink with "ls -l" the 'which smbspool' hadn't worked and it had linked to "which smbspool" instead of the output of that command. I remade the link so it now points to "/usr/bin/smbspool." However, I do everything I did before and I still get the exact same error as above. I also tried using the samba web interface and it failed every way I try it. I have the hostname set up in /etc/hosts but I can't even use the name with smbclient or I get an error... I have to use the IP. I tried both the name and the IP in the web interface and neither will print a test page. When I use the IP, the printer state is: "cli_session_request() failed..." Any other ideas?
When I use the hostname instead of the IP, the printer state is: "Unable to connect to SAMBA host, will retry in 60 seconds...ERROR: cli_session_request() failed..." I had another idea about what could be going wrong... does a specific port need to be open on the windows box for this to work? I can use smbclient to view/access the shares on that computer, but I thought maybe printing is trying to use another port that is blocked and needs to be opened up in the firewall.
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
you could try turning the firewall off to see if that is the issue? were you able to find a compatible ppd file, as that also could be the issue. have you been able to get smbclient -L to work w/the netbios name of the windows box? if not, try adding it to /etc/hosts in this format
you'll have to restart services for the changes to take effect, for the network, or for cups.
I tried changing the /etc/hosts entry to the real name of the windows box and smbclient now works perfectly that way. Now when I set it up in the web interface, I get the following error when trying to print a test page: "SMB tree connect failed: NT_STATUS_ACCESS_DENIED" (even when the firewall is turned off). As for the ppd, I couldn't find one that fit perfectly, but I've just been trying ones that sound generic or the "Raw" format option in the web client. I read about ppds a little and it sounds like using the wrong ppd should just mess up formatting and things like that rather than giving an error like access denied. Does this give any more hints as to what the problem could be or do I need to do more in-depth ppd experimenting?
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
It could be a ppd problem, or a filter problem, or an smb backend problem. I had a similar problem w/my freebsd installation which stumped me for a while, until I found the proper foomatic scripts. what are you using for the uri?