This is a discussion on setting the computer name within the Linux Networking forums, part of the Linux Forums category; I installed whitebox linux to test using a linux server in windows networks. During installation I misconstrued the opportunity to ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I installed whitebox linux to test using a linux server in windows
networks. During installation I misconstrued the opportunity to set a name for the computer and left in blank, so I now hava a computer with the name localhost. *Not good* I can't connect from a win xp pro to a samba shared directory, because xp believes it and the linux machine have the same name. This aught to be easy, I thought, just change the name on the linux machine. Alas, this has caused trouble. If I try to use the graphic network configuring tool and set the hostname under DHCP settings (the only place there is to enter a hostname) nothing seems to happen and I am still localhost when I reboot. I changed the hostname= in the /etc/sysconfig/network file (and in the /etc/sysconfig/networking/profiles/default/network file), and that worked, *except* I then would get an error message when I tried to log into gnome saying that it could not find an address for linux [what I had used for the hostname] and maybe I should enter the address in the hosts file. Well I am using a router with DHCP, so I doubt that is a solution. I have looked in several help sources and none seem to address the problem I am having. I now have everthing back the way it was (and samba not working again). Can anyone give me some direction? I feel like I am missing something obvious, but I have always used windows and know nothing about linux. In fact, the whole point is to test using linux servers instead of windows servers with windows xp clients. Thanks for any help. Kurt Arbuckle |
|
|||
|
Lawman wrote:
> I installed whitebox linux to test using a linux server in windows > networks. During installation I misconstrued the opportunity to set a > name for the computer and left in blank, so I now hava a computer with > the name localhost. *Not good* I can't connect from a win xp pro to a > samba shared directory, because xp believes it and the linux machine > have the same name. Try /etc/samba/smb.conf eat -- Pix | http://photos.eatnet.org.uk [updated 25th April] ScR | http://groups.yahoo.com/group/scot-rail |
|
|||
|
Lawman wrote:
> I installed whitebox linux to test using a linux server in windows > networks. During installation I misconstrued the opportunity to set a > name for the computer and left in blank, so I now hava a computer with > the name localhost. /etc/hosts add the hostname you wish in the hosts file. eg: 127.0.0.1 localhost.localdomain your-host-name also -- 'man hostname'. -- Woolsey-Swanson Rule: People would rather live with a problem they cannot solve than accept a solution they cannot understand. remove '.eh' to email |
|
|||
|
Ewan <nospam@eatnet.org.uk> wrote in
news:c73ga7$hqfjb$1@ID-207219.news.uni-berlin.de: > Lawman wrote: > >> I installed whitebox linux to test using a linux server in windows >> networks. During installation I misconstrued the opportunity to set >> a name for the computer and left in blank, so I now hava a computer >> with the name localhost. *Not good* I can't connect from a win xp >> pro to a samba shared directory, because xp believes it and the linux >> machine have the same name. > > Try /etc/samba/smb.conf > > eat > I created a real simple smb.conf file for testing. I didn't find anything in the documentation for smb.conf that helped with the hostname issue. Now there is a /etc/samba/lmhosts file that has one line in it: 127.0.0.1 localhost I assume that is what should be in that file. ? Thanks, Kurt Arbuckle |
|
|||
|
On Sun, 02 May 2004 19:57:13 +0100, Ewan <nospam@eatnet.org.uk> wrote:
>Lawman wrote: > >> I installed whitebox linux to test using a linux server in windows >> networks. During installation I misconstrued the opportunity to set a >> name for the computer and left in blank, so I now hava a computer with >> the name localhost. *Not good* I can't connect from a win xp pro to a >> samba shared directory, because xp believes it and the linux machine >> have the same name. > >Try /etc/samba/smb.conf > >eat You're looking at a situation where you could have (should have) multiple hostnames for the system, depending. The samba system name may or may not be the same as the tcp/ip hostname. For the situation you describe, the tcp/ip hostname can be set with the hostname command. The samba system name is set like this - [global] server string = Firewall in smb.conf lmhosts is the equivilant of the /etc/hosts file - it maps ip addresses to netbios (samba) names. Several quick tips: take a look at swat - you can set the config options up without having to worry about the syntax. You don't mention which version of samba you're using, but this is true of all of them - just more true the higher the version you use - the example config files barely touch the surface of the subject, and the how-tos on the samba site aren't great either. You need to spend a lot of time with google. Mike- -- If you're not confused, you're not trying hard enough. -- Please note - Due to the intense volume of spam, we have installed site-wide spam filters at catherders.com. If email from you bounces, try non-HTML, non-encoded, non-attachments, |
|
|||
|
Lawman wrote:
> Ewan <nospam@eatnet.org.uk> wrote in > news:c73ga7$hqfjb$1@ID-207219.news.uni-berlin.de: > > >>Lawman wrote: >> >> >>>I installed whitebox linux to test using a linux server in windows >>>networks. During installation I misconstrued the opportunity to set >>>a name for the computer and left in blank, so I now hava a computer >>>with the name localhost. *Not good* I can't connect from a win xp >>>pro to a samba shared directory, because xp believes it and the linux >>>machine have the same name. >> >>Try /etc/samba/smb.conf >> > > I created a real simple smb.conf file for testing. I didn't find > anything in the documentation for smb.conf that helped with the hostname > issue. netbios name = servername workgroup = workgroup server string = the file server > Now there is a /etc/samba/lmhosts file that has one line in it: > 127.0.0.1 localhost > > I assume that is what should be in that file. ? That's what I've got in /etc/samba/lmhosts But be warned, I'm not a Linux guru but the above settings are in my ../smb.conf file and work. hth, eat -- Pix | http://photos.eatnet.org.uk [updated 25th April] ScR | http://groups.yahoo.com/group/scot-rail |
|
|||
|
Hi,
> I changed the hostname= in the /etc/sysconfig/network file (and in the > /etc/sysconfig/networking/profiles/default/network file), and that > worked, *except* I then would get an error message when I tried to log > into gnome saying that it could not find an address for linux [what I > had used for the hostname] and maybe I should enter the address in the > hosts file. Well I am using a router with DHCP, so I doubt that is a > solution. I'm collecting a bit of information from the other answers to your post. I guess you should try them alltogheter... Maybe the following hints would help: - additional to the files mentioned above, the hostname is read from the file "/etc/hostname" at boot time afaik. Change it there, this should do it after a reboot. Well, there is a command to do this dynamically (without reboot) try "man hostname", but also change the /etc/hostname file, so that the new name is valid for all future boots. - exctend the "localhost" line in /etc/hosts (and possibliy /etc/samba/lmhosts) 127.0.0.1 loclhost -----> 127.0.0.1 localhost <YourNewHostname> - when accessing shares via Windows Network-Nwighbourhood, usually the NetBIOS name of the server is used (you can disable this, so that only DNS (IP-level names) are used, but this is not the default case). As said by other people, you can set this in /etc/samba/smb.conf in section [global] use: netbios name=<YourNewServerName> The key "server string" is not the name of your sambs server, it's the machines description shown by Windows in Network Nieghbourhood In Windows-Explorer you might type "\\<YourNewServerName>" in address bar. HTH Ralf |