Pages

Sunday, January 7, 2007

Slow move to linux - Resolving computer names with wins

For a while know I have wanted to make a greater move to linux. My fear has been being stuck without a usable computer (either the replacement would be too slow or the machine would not be in a stable state). Running my laptop on Fedora Core 5 for the past ~9 months has been rather good for testing the waters. I need to reformat the laptop because of issues within the package management ( I tried to get wireless working before it was introduced into the repository, so had to compile from source, also tried to compile alsa from source, not sure why any more ). Fedora Core 6 is also out so I thought I would try to start with a clean slate.

One thing that troubles me is updates are all of the net. If I want more than one computer to be on the same distro and I want to play around with the distro more often, then I need a closer copy of those repositries.

Step 1. Setup Box with those repositries.
I setup a box a while ago ( can’t believe I didn’t blog it ) as a potential server. I’ve setup apache and copied the installers off of the cd into a directory.
The box will update itself from its own server.

Step 2. Connect to the box from another machine.
I have had various problems with this. It is always easy to ping the ip address, but I don’t won’t to be that simple. Enabling samba and wins support in linux is easy enough.
To get samba running you just need to set it as a startup service. There is a services menu item in fedora.
To get wins support in samba, I had to edit /etc/samba/smb.conf ; find ( or add ) wins support = yes

That’s fine. I can do a nmblookup to find the computer name, but why can’t I ping it. I turned on a Windows box and it can ping it, obviously the machine doesn’t know that it can use wins to resolve names.
/etc/hosts is a file to hardcode computer names to ip addresses.
/etc/resolv.conf is a file to specify nameservers
/etc/host.conf I though would hold the answer. Mine has a line “order hosts, bind”. I found out that hosts refers to the hosts file, and bind refers to a DNS lookup. I thought that if I added in there wins I would be set. But it is an invalid entry.

There is another file which took my a while to find (samba doc): /etc/nsswitch.conf. In it is the line “hosts: files dns”
Adding wins in there saved the day (had to restart network services before it was affected of course). I know have the ability (knowledge) to ping the box by machine name. Hazzar. It only took me 2-3 days. Next I think will be CVS. I have set it up before, but need to setup it up on a real machine. Then it will be getting a good sync process happening for the packages (core updates and extras)

-= Comments
1. Jonathan | January 8th, 2007 at 6:54 pm
Oh, cool. I’ve been looking to setup a machine with fedora (that is what you have on the server) and I’ve got one with RedHat (Think it’s called RH EL 4.3)
Remember to tell us how you set it up for CVS!

2. Wireless Networking | July 13th, 2008 at 1:09 am
Good article, keep em coming

No comments:

Post a Comment