LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 03-17-2011, 02:53 PM   #1
Quads
Member
 
Registered: Jul 2008
Location: Indiana
Distribution: Fedora, Ubuntu, Slackware
Posts: 203

Rep: Reputation: 34
Hostname change


I feel so silly asking this but...

I have two Mandriva 2010.2 machines here. I changed the hostname on one from localhost to localserver. Output of uname -a shows the proper hostname, but across a samba share the machine still shows up as localhost. I edited the /etc/hosts file, but I cannont figure out why it shows up this way. Samba works, I just find it irritating.
 
Old 03-17-2011, 02:54 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Um,.. do you mean you changed the /etc/hosts file to say

Code:
127.0.0.1 localserver
??
 
Old 03-18-2011, 12:38 AM   #3
ernie
Senior Member
 
Registered: Nov 2001
Location: Toledo, Ohio - USA
Distribution: Mageia 1
Posts: 1,079
Blog Entries: 4

Rep: Reputation: 70
Check the Samba configuration on the machine with the changed host name . . .

HTH,
 
Old 03-18-2011, 01:17 PM   #4
Quads
Member
 
Registered: Jul 2008
Location: Indiana
Distribution: Fedora, Ubuntu, Slackware
Posts: 203

Original Poster
Rep: Reputation: 34
Quote:
Originally Posted by szboardstretcher View Post
Um,.. do you mean you changed the /etc/hosts file to say

Code:
127.0.0.1 localserver
??
Yes. The hostname command now says the machine is named localserver. However I'm trying to figure out why its not represented as such on the network. Obviously it is somewhere else too.
 
Old 03-18-2011, 01:26 PM   #5
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Quote:
Originally Posted by Quads View Post
Yes. The hostname command now says the machine is named localserver. However I'm trying to figure out why its not represented as such on the network. Obviously it is somewhere else too.
Ok.

change /etc/hosts back to:

Code:
127.0.0.1 localhost.localdomain	localhost localserver
Because it will break things in your system if you've changed it. You can *add* your new hostname to it, as Ive shown, but do not remove the localhost entries.

Also, edit the file: /etc/sysconfig/network

and change HOSTNAME=lkjdlkjd to HOSTNAME=localserver

Now, for other systems to see this machine as "localserver" you will need to add

Code:
192.168.1.100 localserver
replacing the ip address with the actual ip of course, to the /etc/hosts files of those systems.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
after hostname change, syslogd still output previous hostname to messages file tiger2000 Linux - General 3 07-22-2009 09:36 PM
Cannot change hostname chriseacrett Linux - Networking 6 01-11-2008 11:28 PM
Change hostname? Zeno McDohl Linux - Newbie 3 02-05-2006 02:42 PM
Change Hostname? Micky2k4 Linux - Newbie 3 09-08-2004 12:09 PM
hostname change deezay Linux - General 2 04-09-2002 10:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 07:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration