[Samba] Desiring to set up Windows Vista and Linux Fedora Core 4
Barry L. Bond
bbond at cfl.rr.com
Fri Oct 23 23:10:39 MDT 2009
Hi Michael!
Thank you again for your very fast reply! I just tonight had a
chance to look over Samba again, and consider the wonderful help you
have in this email.
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.
The D-Link EBR-2310 router is IP 192.168.1.1.
The Linux eth0 port is IP 192.168.2.1.
It is actually plugged into the second port of another D-Link device, a
Gigabit switch (a DGS-2205).
Also plugged into the switch is port qfe1 (of a 4-port Ethernet card
I have in a Sun Ultra 30), with the address of 192.168.2.2.
Port qfe0 of the Sun 4-port Ethernet card is 192.168.1.201, and it is
attached to the EBR-2310 router.
(The switch is used to be able to allow the Linux as well as the Sun
to control my ESP-16 MI [serial port hub, 16 serial connections]. A few
of the serial connections are terminals, so they can actually be
controlled by the Sun as well as the Linux. Actually, at the moment,
everything else that is attached to serial connections [weather station,
mailing label printer, speech synthesizer, UPS, X10 power controller,
etc.] I really only have the programming at the moment to control these
things on the Linux system.)
The Sun is the router. It also takes the Linux 192.168.2 connection
and routes it to/from the 192.168.1, the cable modem and Internet. (And,
the Sun is my mail host.)
Again, the Windows computer is on the router, and that is how it is
connected to the Linux. (And, I have a 4-camera DVR attached to the
router, and DDNS set up to allow a URL to be used to look at the cameras
when I'm at work. Helps me check on things on an occasional day when I
know my mother is going to be out.)
Actually, I'm not really using the VMWare right now at all. The two
vmnet interfaces allowed the connection to that, though. (I added eth0
for the Windows Vista computer.)
> > guest account = barry
> > username map = /etc/samba/smbusers
> > log file = /var/log/samba/%m.log
> > max log size = 50
> > socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
> > printcap name = /etc/printcap
> > preferred master = Yes
> > dns proxy = No
> > idmap uid = 16777216-33554431
> > idmap gid = 16777216-33554431
> > guest ok = Yes
> > hosts allow = 192.168.1. 192.168.2. 127.
> > 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! :-)
> > [homes]
> > comment = Home Directories
> > read only = No
> >
> > [printers]
> > comment = All Printers
> > path = /var/spool/samba
> > printable = Yes
> > browseable = No
> >
> > [HostFS]
> > comment = VMware host filesystem
> > path = /
> > read only = No
> >
> > [barry]
> > path = /home/barry
> > valid users = barry
> > read only = No
>
> This should not really be necessary because of the [homes] section
> above, but should not cause any trouble either.
Okay...
> > [HP9110]
> > comment = Hewlett-Packard OfficeJet 9110
> > path = /var/spool/samba
> > read only = No
> > printable = Yes
> > printer name = HP9110
> > oplocks = No
> > share modes = No
>
> Your [printers] section should automatically set up a share for any
> printers defined in your /etc/printcap file. So this should also not
> be necessary.
Okay... if I seem to get some sort of Samba "connection" between the
Windows and Linux boxes, but have other trouble, I'll keep this in mind.
> > <<>>
> > "service smb restart" in my root window:
> [...]
> > On the Windows computer, I clicked Start and then Network.
> >
> > I double-clicked OFFICE-WINDOWS.
> >
> > I double-clicked "Add a Printer".
> >
> > Then an "Add a printer" came up near the top of my explorer, after
> > Organize and Views.
> >
> > Clicking "Add a printer", I choose "Add a network, wireless or
> > Bluetooth printer" in the dialog box that comes up. ("Add a local printer"
> > is the only other choice here.)
>
> Yes, Network printer is the correct option.
>
> > It says "Searching for available printers..."
> >
> > After a delay, it says "No printers were found."
> >
> > I click "The printer that I want isn't listed" and out of the three
> > choices ("Browse for a printer", "Select a shared printer by name" and
> > "Add a printer using a TCP/IP address or hostname"), I choose the second
> > one, as the printer is connected to my Linux system with a parallel port,
> > and it does not have an IP address.
>
> Well, actually the IP address in this case would have been the IP
> address of the Linux box. If the printer was plugged directly into
> the network then of course this would be the IP address of the printer
> itself. But the option you chose should work if the name resolution
> (WINS) etc. are working properly. You might try the third option to
> see what it does. I can't test that myself right now.
>
> > I click in the "text box" and type "\\barrycon\hp9110"
>
> Try using HP9110 as the share name instead of hp9110. Not sure if it
> makes a difference. Also try Bruno's suggestion of using the Linux
> machine's IP address instead of the name.
Okay. Thank you! :-)
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."
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:
192.168.2.1
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
I click the [Next] button.
It says "Contacting printer..."
After a delay, it brings up a window that says "Detecting TCP/IP
Port". It says "Windows will automatically move to the next page when the
detection is done."
After a delay, it says "The device is not found on the network."
followed by a "Be sure that" with standard things (the device is turned
on, the network is connected, the address on the previous page is correct,
etc.).
> 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".
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.)
> > Another dialog box says "Connecting to hp9110 on barrycon" and after
> > a short delay it says "Windows cannot connect to the printer. The server
> > print spooler service is not running. Please restart the spooler on the
> > server or restart the server machine."
>
> See if the Windows box can resolve the name of the Linux box:
>
> C:\>nbtstat -a barrycon
Wow, I had no clue about that command! :-D
I clicked Start->All Programs->Accessories->Command prompt
In the command prompt, I'm typing "C:\>nbtstat -a barrycon"
Ah... I don't need the C:\> part... I'm typing "nbtstat -a barrycon"
It says: "Local Area Connection:
Node IpAddress: [192.168.1.102] Scope Id: []
Host not found."
> 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.
> 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'm typing "ping 192.168.2.1"...
It says "Pinging 192.168.2.1 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 192.168.2.1:
Packets: Sent = 4, Received = 0, Lost = 4 <100% loss>,"
I don't appear to be connecting! I see that now, where I didn't
before! :-)
> Something else you might like to try is backing up your smb.conf file
> and starting very simply based on this:
>
> http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/FastStart.html#id2554870
>
> 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 am using CUPS. It works great.
Thank you Michael and Bruno. I'll CC this to the Samba mailing list.
Barry
--
Barry L. Bond | http://home.roadrunner.com/~os9barry
Software Engineer, ITT Corporation | (My personal home web page, last
| updated February 17, 2005)
|
bbond @ cfl.rr.com <- personal | Re-Vita Products:
Barry.Bond @ ITT.com <- Work ONLY | http://www.re-vita.net/barrybond
| Re-Vita Distributor Information
Home office: 407-382-2815 | http://www.re-vita.net/barrybond-2
Work: 321-494-5627 (Work) | Toll free order: 1-888-820-5531
More information about the samba
mailing list