Networking Forums

Networking Forums > Computer Networking > Linux Networking > setting the computer name

Reply
Thread Tools Display Modes

setting the computer name

 
 
Lawman
Guest
Posts: n/a

 
      05-02-2004, 06:50 PM
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
 
Reply With Quote
 
 
 
 
Ewan
Guest
Posts: n/a

 
      05-02-2004, 06:57 PM
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
 
Reply With Quote
 
johnny bobby bee
Guest
Posts: n/a

 
      05-02-2004, 07:11 PM
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
 
Reply With Quote
 
Lawman
Guest
Posts: n/a

 
      05-02-2004, 07:16 PM
Ewan <(E-Mail Removed)> wrote in
news:c73ga7$hqfjb$(E-Mail Removed):

> 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
 
Reply With Quote
 
Michael W. Cocke
Guest
Posts: n/a

 
      05-03-2004, 01:40 PM
On Sun, 02 May 2004 19:57:13 +0100, Ewan <(E-Mail Removed)> 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,
 
Reply With Quote
 
Ewan
Guest
Posts: n/a

 
      05-03-2004, 03:37 PM
Lawman wrote:
> Ewan <(E-Mail Removed)> wrote in
> news:c73ga7$hqfjb$(E-Mail Removed):
>
>
>>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
 
Reply With Quote
 
Ralf Herrmann
Guest
Posts: n/a

 
      05-05-2004, 01:22 PM
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting NAT on XP computer ? Eliane de Tahiti Network Routers 0 03-26-2006 01:23 PM
Setting up a new computer as base station on existing network Martin J. Leahy, Esq. Broadband Hardware 5 01-29-2005 06:10 PM
Setting up a new computer network Slider Home Networking 3 10-18-2004 07:41 PM
setting up with one computer scp4371 Broadband Hardware 0 08-23-2004 03:14 PM
Setting up older computer to new one with cable modem-help Daniel Windows Networking 1 12-17-2003 06:52 PM



1 2 3 4 5 6 7 8 9 10 11