[Samba] Desiring to set up Windows Vista and Linux Fedora Core 4
esiotrot at gmail.com
Sun Nov 8 07:02:50 MST 2009
2009/10/24 Barry L. Bond <bbond at cfl.rr.com>:
> On Sat, Oct 10, 2009 at 03:45:17PM +0200, Michael Wood wrote:
>> > Here is my current smb.conf file:
>> > <<>>
>> > # Samba config file created using SWAT
>> > # from 127.0.0.1 (127.0.0.1)
>> > # Date: 2009/10/03 00:37:16
>> > # Global parameters
>> > [global]
>> > server string = Windows in Linux - VMware
>> > interfaces = eth0, vmnet1, vmnet8
>> I see you are restricting Samba to the above interfaces. Which
>> interface is your Windows machine plugged into? Your hosts allow line
>> leads me to suspect you might have another ethernet interface in the
>> machine (unless the other 192.168.x.y network is allocated to VMware.)
> The Windows box is plugged into my D-Link router, as it has one
> network interface connection and I also access the Internet with it.
It would be a lot easier for people to follow if you provided an ASCII
art diagram of all the machine and routers involved, but I have drawn
your network on a piece of paper based on your description.
It seems your Linux box only has one network card, right? And are you
trying to print from the Windows machine connected to your D-Link
router? Or from a Virtual machine running under VMware on the Linux
Your interfaces line appears to specify all possible interfaces other
than lo anyway, so you may as well leave it out.
>> > printcap name = /etc/printcap
>> > cups options = raw
>> Are you using cups? The "printcap name" above leads me to believe you
>> are not using cups.
> Yes. :-) Who knows... when I first set up my FC4 Linux system, I
> wasn't using cups, but I installed it soon afterward. That may have been
> leftover from then, but it was working! :-)
Well, if you are using CUPS, you could set up an IPP printer on the
Windows box and bypass Samba completely. In the "Add Printer Wizard"
you tell it to add a network printer and on the next screen choose the
"Connect to a printer on the Internet..." option (XP. Not sure if
it's the same for Vista). The URL should be something like:
(depending on what name the printer has been given in CUPS.)
Try browsing to http://127.0.0.1:631 on the Linux box to see if CUPS is running.
> I just typed "\\192.168.2.1\HP9110" in the text box and I clicked the
> [Next] button.
> The dialog box says "Connecting to HP9110 on 192.168.2.1"...
> After a delay, it eventually brings up another dialog box that says
> "Windows cannot connect to the printer. Make sure that you have typed the
> name correctly, and that the printer is connected to network."
Perhaps you should see if you can telnet to the TCP ports mentioned by
Eero from the Ultra 30. It would be better to test from Vista, but
I've been told Vista does not have a telnet client built in.
Otherwise you could download something like PuTTY and see if you can
connect to those ports from the Vista machine.
> Trying the third option, "Add a printer using a TCP/IP address or
> hostname", I click the [Next] button.
> For "Device type" I have left it at "Autodetect".
> For Hostname or IP address, I'm using the IP of the Linux system:
> The third line is "Portname". (I have never done it this way
> before.) At the moment, it has "192.168.2.1" which it put there as I
> typed in the IP address in the second line, and it adds a "_1". (So the
> entire item is: 192.168.2.1_1
Perhaps this is the Vista equivalent of the XP "Connect to a printer
on the Internet or on a home or office network" option. If so, you'll
want to try port 631 (assuming you are running CUPS on the Linux box.)
I'm not sure if this is what is meant by the above, though, and there
should be somewhere to put in /printers/HP9110 or something like that
too if it is.
>> What does the following give you:
>> rpm -qf /usr/bin/lpstat
>> or maybe:
>> rpm -qf /usr/sbin/lpstat
>> (I haven't run an rpm-based distribution in a while...)
> The first rpm gave me "cups-1.1.23-15". The second one (with /sbin)
> said "No such file or directory".
OK, so it seems that CUPS is installed. Or at least part of it.
What does "rpm -qa | grep cups" give you?
> Actually, most of my Fedora Core system was installed by yum, and not
> rpm. (But, though it does an automatic update sometimes that I see in the
> LogWatch that runs at 4:00 every morning, I'm having difficulty running it
> myself right now.)
yum is just a front end to rpm.
>> See if the Windows box can resolve the name of the Linux box:
>> C:\>nbtstat -a barrycon
> It says: "Local Area Connection:
> Node IpAddress: [192.168.1.102] Scope Id: 
> Host not found."
OK, so name resolution is not working. This is likely because you
have the Windows box and the Linux box on different subnets. You
could try configuring the Windows box to use the Linux box as a WINS
server. Samba would have to be running as a WINS server.
>> It should show the IP address and then a "NetBIOS Remote Machine Name Table".
>> Also try:
>> C:\>nbtstat -A 192.168.x.y
>> (with the IP address of the Linux machine.)
> I'm typing "nbtstat -a 192.168.2.1"...
> ...and it says EXACTLY the same thing, after a slight delay.
Note the capital A in my command. When you query an IP address using
nbtstat you need -A instead of -a.
>> Also see if this works from the Windows box:
>> C:>ping barrycon
> Typing "ping barrycon" displays (after a slight delay) "Ping request
> could not find host barrycon. Please check the name and try again."
I would not expect this to work if "nbtstat -a barrycon" did not work.
> I'm typing "ping 192.168.2.1"...
> It says "Pinging 192.168.2.1 with 32 bytes of data:
> Request timed out.
OK, so either you have a firewall blocking this (e.g. on the Ultra 30
or on Linux) or the Window box does not know how to get to the
192.168.2.0/24 network. If it's the latter, add a route for
192.168.2.0 netmask 255.255.255.0 to the Windows machine's network
settings with a gateway of 192.168.1.201 (the IP of the Ultra 30 on
the 192.168.1.x subnet).
Also check that you can ping 192.168.1.201 from the Window box.
>> Something else you might like to try is backing up your smb.conf file
>> and starting very simply based on this:
>> See also the other examples on that page, but do not bother with the
>> domain member and domain server sections. They are most likely much
>> more complicated than is necessary for what you want to know.
>> Of course that does assume you're using CUPS, so you might have to
>> modify it a bit if you're not using CUPS.
> Thank you! I see the link, and I can't work much longer this morning (it's after
> 1:00 Saturday morning), but I'll keep it and try it soon, also depending on what you and
> others offer as additional suggestions from this post. :-)
I still think it would be worth trying to start with the simple config
mentioned above, but your routing and firewalling should be correct
> I am using CUPS. It works great.
Well then you might be able to ignore Samba for the printing and just
directly use CUPS, but again your routing (and firewalling, if any)
will need to be correct first.
Michael Wood <esiotrot at gmail.com>
More information about the samba