LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 09-20-2004, 10:58 PM   #1
snakeo2
Member
 
Registered: Mar 2004
Location: Miami, Fl
Distribution: Red Hat 9/fedora core3/
Posts: 273

Rep: Reputation: 31
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
 
Old 09-21-2004, 01:39 PM   #2
secesh
Senior Member
 
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154

Rep: Reputation: 47
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>
 
Old 09-21-2004, 04:46 PM   #3
dsegel
Member
 
Registered: Aug 2004
Location: Davis, California
Distribution: Gentoo, always Gentoo.
Posts: 159

Rep: Reputation: 30
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?
 
Old 09-21-2004, 06:18 PM   #4
snakeo2
Member
 
Registered: Mar 2004
Location: Miami, Fl
Distribution: Red Hat 9/fedora core3/
Posts: 273

Original Poster
Rep: Reputation: 31
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??
 
Old 09-21-2004, 08:04 PM   #5
snakeo2
Member
 
Registered: Mar 2004
Location: Miami, Fl
Distribution: Red Hat 9/fedora core3/
Posts: 273

Original Poster
Rep: Reputation: 31
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
 
Old 09-22-2004, 01:21 AM   #6
dsegel
Member
 
Registered: Aug 2004
Location: Davis, California
Distribution: Gentoo, always Gentoo.
Posts: 159

Rep: Reputation: 30
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.

Last edited by dsegel; 09-22-2004 at 01:23 AM.
 
Old 09-22-2004, 12:55 PM   #7
secesh
Senior Member
 
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154

Rep: Reputation: 47
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.
 
Old 09-22-2004, 01:16 PM   #8
dsegel
Member
 
Registered: Aug 2004
Location: Davis, California
Distribution: Gentoo, always Gentoo.
Posts: 159

Rep: Reputation: 30
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.
 
Old 09-22-2004, 06:08 PM   #9
snakeo2
Member
 
Registered: Mar 2004
Location: Miami, Fl
Distribution: Red Hat 9/fedora core3/
Posts: 273

Original Poster
Rep: Reputation: 31
No, I still cant connect. This is the syntax im using. By the way im trying to set up my printer via Cups

smb://Snakeassword@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
 
Old 02-26-2005, 07:06 AM   #10
tulip4heaven
Member
 
Registered: Jan 2005
Posts: 55

Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing from a Windows box to Samba gblasius Linux - Newbie 2 10-03-2005 04:05 AM
How to set up printing to Windows box? Micro420 Ubuntu 4 08-19-2005 04:24 PM
printing from a remote windows box LovelyJunna Linux - Newbie 0 03-26-2004 04:39 PM
SMB Printing to a Windows Box scottpioso Linux - Hardware 2 01-12-2003 02:34 PM
Windows printing to a Linux box kc571 Linux - Networking 1 11-10-2001 05:44 PM


All times are GMT -5. The time now is 01:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration