LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   printing to windows box using samba? (https://www.linuxquestions.org/questions/linux-newbie-8/printing-to-windows-box-using-samba-233167/)

snakeo2 09-20-2004 10:58 PM

printing to windows box using samba?
 
I had successfully configured samba and was able to print to the printer attached to the windows box using redhat9. Im now using FC2 and i forgot the steps to configure samba. Right now I cant connect to the computer with the printer. I remember when i first started using redhat i was able to connect to the windows box with the following command:

smbclient -L VERO (VERO is the name of the computer with the printer attached)
now im getting this error message
$ smbclient -L VERO
Connection to VERO failed
I know that I have to go to http:localhost:631 and set up my printer from there. I dont understand why the connection fails. thanks in advance

secesh 09-21-2004 01:39 PM

for one, the address is bad, it is http://localhost:631/

try:
ping vero

-- i'm guessing you get request timed out, or unavailable

is vero's ip static or dynamic?

--try using
smbclient -L <vero's IP>

dsegel 09-21-2004 04:46 PM

Doesn't FC2 come with some kind of printing wizard that walks you through the connection? I think it lets you select a networked samba printer and then will browse for it.

Or are you trying to do this from the command line?

snakeo2 09-21-2004 06:18 PM

thanks for the reply secesh. I was able to connect by using the code
smbclient -L 192.168.0.xxx. The ip for VERO is dynamic. is there a reason why I cant ping the xp machine by its name??

snakeo2 09-21-2004 08:04 PM

This is a little frustrating. Here is what i've done so far

smbclient - L 192.168.0.xxx
Password:
Domain=[VERO] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Sharename Type Comment
--------- ---- -------
IPC$ IPC Remote IPC
print$ Disk Printer Drivers
SharedDocs Disk
My Music Disk
Printer2 Printer HP DeskJet 950C/952C/959C (Copy 1)
ADMIN$ Disk Remote Admin
C$ Disk Default share
Printer Printer HP DeskJet 950C/952C/959C
session request to 192.168.0.xxx failed (Called name not present)
session request to 192 failed (Called name not present)
Domain=[VERO] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Server Comment
--------- -------

Workgroup Master
--------- -------
went to http://localhost:631/ clicked on printers, typed root in the user name tab, typed in my password proceeded to add my printer. filled in the name tab with the name of the shared printer in my xp box. Left the location and description boxes empty. I then selected windows printer via SAMBA. For device URI:
smb:/johndoe@localhost/myprinter, where john is the username for the xp box and doe is the password for john, localhost is the name of the xp box and my printer the name of the shared printer. Next I selected the make of my printer (HP). However, I could not find the model of my printer in the model section, so I selected HP Deskjet Series (Cups). I cant print. Im getting these error messages

"Connection failed with error NT_STATUS_UNSUCCESSFUL"

any help will be appreciated

dsegel 09-22-2004 01:21 AM

Quote:

Originally posted by snakeo2
smb:/johndoe@localhost/myprinter, where john is the username for the xp box and doe is the password for john...
If the Win box is really named 'localhost' it won't work, because linux will assume that's the linux box you're running the command on. You can't refer to another PC on the same network as localhost.

Also, you need to do it like this instead:

smb://john:doe@winbox/myprinter

with a : between the username and password. For example, my printer hanging off of a WinXP box with no password is set up like this:

smb://guest:@maisy/samwise

'maisy' is the Win box, samwise is the printer.

secesh 09-22-2004 12:55 PM

did the syntax get you connected? (i'm not reading the entire post)

as far as being able to ping by name -- that is a DNS issue. you can work around that
using your /etc/hosts file.

just add an entry for your XP box, which you might want to consider making a static IP
because it is a server, and you won't want to be updating hosts files every time it rolls.

dsegel 09-22-2004 01:16 PM

Yeah, I was going to mention that unless you have the Windows box entered into a hosts file on your linux PC or local DNS server you can't refer to it by name and expect things to work every time.

snakeo2 09-22-2004 06:08 PM

No, I still cant connect. This is the syntax im using. By the way im trying to set up my printer via Cups

smb://Snake:password@server/Printer2. When I was running redhat9, I never had to add lines to my /etc/hosts file. I just went to http://localhost:631 and configured it from there and it worked.

Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost

what line do I have to add?? Also, I havent added a user to samba yet. Should I add a user to samba in order to be able to print my xp box?? Again, when I had redhat9 I didnt do that either. Thanks in advance for your help

tulip4heaven 02-26-2005 07:06 AM

Dear Snakeo ,

Hi,


I m facing problem with printing to windows from linux.
You have done it , let me know how you did this.

i m using redhat 9

and my printer hp1000 is connected with win98


i can connect with windows box using smbclient command

but i want send print ,..


plz let me know in steps or send me conf file


waiting for your positive response

Thanks


All times are GMT -5. The time now is 05:47 AM.