No print to Samba (Linux) printer from Win98 - SOLVED.

Mike Watson mikew at crucis.net
Mon Dec 17 10:07:02 GMT 2001


I now have the deskjet print printing from my Win98 box.  Something in the
"hpdeskjet" entry was causing the error of "No machine name found" to appear when
I tried to print from Win98.  I fixed this by deleting the entry and re-creating
it.  I also specifically added allowed IP addresses instead of using "all" in the
config file. I created a generic text printer share and that worked!

Here is the two smb.conf files.  The first is the "before" file.  Test printer
worked, HPDESKJET didn't.  The second is after I deleted HPDESKJET and recreated
it.  Now both work.  What differences caused the problem?

Mike W

The before smb.conf

# Samba config file created using SWAT
# from 0.0.0.0 (0.0.0.0)
# Date: 2001/12/06 17:59:48

# Global parameters
[global]
	path = /var/spool/lpd/HPDESKJET
	remote announce = 192.168.1.2/MYGROUP
	printing = bsd
	allow hosts = 192.168.1.2
	dns proxy = No
	name resolve order = lmhosts host bcast
	null passwords = Yes
	lpq command = lpq -L
	printer name = HPDESKJET
	printcap name = /etc/printcap
	max log size = 50
	writable = yes
	printer = HPDESKJET
	lprm command = lprm
	workgroup = MYGROUP
	log level = 8
	default service = global
	comment = Linux Printer
	print command = lpr -l -P%p %s
	load printers = yes
	guest account = ftp
	public = yes


[HPDESKJET]
	comment = All Printers
	create mode = 0700
	print command = lpr -l -P%p%s
	printable = yes


[Test]
	path = /var/spool/samba
	comment = Linux Test Printer (file)
	printable = yes

The "after" smb.conf file---both printers work.

# Samba config file created using SWAT
# from 0.0.0.0 (0.0.0.0)
# Date: 2001/12/06 17:59:48

# Global parameters
[global]
	path = /var/spool/samba
	remote announce = 192.168.1.12/MYGROUP
	allow hosts = 192.168.1.2
	printing = bsd
	dns proxy = No
	lpq command = lpq -L
	null passwords = Yes
	name resolve order = lmhosts host bcast
	printcap name = /etc/printcap
	printer name = HPDESKJET
	max log size = 50
	writable = yes
	printer = HPDESKJET
	lprm command = lprm
	log level = 8
	workgroup = MYGROUP
	default service = global
	comment = Linux Printer
	print command = lpr -l -P%p %s
	guest account = ftp
	load printers = yes
	public = yes


[Test]
	path = /var/spool/samba
	comment = Linux Test Printer (file)
	printable = yes

[hpdeskjet]
	path = /var/spool/samba
	printable = yes

Can anyone spot the cause why HPDESKJET got a "No machine name found" in the
first smb.conf?

Mike W.

Mike Watson wrote:
> 
> Interesting...
> 
> I created test share---generic text printer---from scratch and it worked.  The
> original printer share doesn't.
> 
> OK, I'll delete the original printer share are rebuild it.  Something in the
> smb.conf printer section is causing the problem.  If I can get it to work, I'll
> post and "before" and "after."
> 
> Mike W.
> 
> Mike Watson wrote:
> >
> > I've noticed from the smb.conf samples I've seen that everyone specifically lists
> > those IP addresses that are allowed instead of using "all" as I did.  I'll test
> > that premise and let you know what happens in a bit.
> >
> > Thanks for all the responses.
> >
> > Mike W
> >
> > Bill Wraith wrote:
> > >
> > > Craig White wrote:
> > >
> > > > 1 - not good form to share a shared printer.
> > > > 2 - you probably don't need c:/windows/lmhosts if all the computers are
> > > > on the same subnet or if you use local dns or of you use a wins server.
> > > > 3 - not the best idea to do tcp/ip file sharing on public ip addresses -
> > > > insecure
> > > > 4 - c:\windows\lmhosts is very similar to /etc/hosts - edit the lmhosts
> > > > file on the windows computer - it will have enough comments to show you
> > > > how it's done but again, if you have a wins server or if the computers
> > > > are on the same subnet - the lmhosts file on windows isn't necessary.
> > > > The way to tell is fairly simple, open network neighborhood and see if
> > > > the computer is listed.
> > > > 5 - I'm surprised that you can get this all done without the command
> > > > 'encrypt passwords = yes' in smb.conf
> > > >
> > > > Craig
> > >
> > > 1) Just did it to create a working example of a win98 client printing to a samba printer.
> > > I of course print directly to the win98 print share from the win98 client normally.
> > >
> > > 2) Agree. I was mentioning lmhosts and hosts because Mike Watson in the original post to
> > > this thread mentioned putting references to his linux box in the lmhosts file. I now see
> > > that lmhosts is the local host lookup file ahead of a WINS query, as hosts is the local
> > > lookup file ahead of a DNS query on a windows box. The samples of these files are
> > > c:\windows\lmhosts.sam and c:\windows\hosts.sam.
> > >
> > > 3) Yes, although this is all behind a firewall that blocks access to MS networking
> > > protocols, and there is domain security, linux file permission security, or NTFS file
> > > system security, since the shares are on linux or win2k servers.
> > >
> > > 4) Agree, although it seems Mike in the original post does have the linux share in his
> > > network neighborhood. Even so, when he tries to print, the "network name cannot be found".
> > > It appears there is some further problem w/name resolution in the win98 network printing
> > > routine beyond the existence of the linux box in the net neighborhood. I was just pointing
> > > out that there are two host lookup files, one is lmhosts the other is hosts. The order and
> > > choice of name resolution methods on the win98 PC will affect which one of these files is
> > > checked and in what order.
> > >
> > > 5) If I understand the smb.conf man page (before I turn my samba server off again) the
> > > reason it works is the "security  = server" line (and the password server line that goes
> > > w/it). My win2k domain controller is providing the authentication. If I log in to the
> > > domain from a win client as a user who isn't already added to my linux box, the shares
> > > don't work, for example.
> > >
> > > Bill
> > >
> > > Maybe some of this discussion will be useful in unraveling the problem Mike is having w/
> > > samba. Beyond that, sorry if this is getting too far off the topic.
> > >
> > > _______________________________________________
> > > enigma-list mailing list
> > > enigma-list at redhat.com
> > > https://listman.redhat.com/mailman/listinfo/enigma-list
> >
> > _______________________________________________
> > enigma-list mailing list
> > enigma-list at redhat.com
> > https://listman.redhat.com/mailman/listinfo/enigma-list
> 
> _______________________________________________
> enigma-list mailing list
> enigma-list at redhat.com
> https://listman.redhat.com/mailman/listinfo/enigma-list




More information about the samba mailing list