LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-10-2004, 04:33 PM   #1
soonerdm
LQ Newbie
 
Registered: Oct 2003
Location: Sooner Nation
Distribution: Redhat 9
Posts: 13

Rep: Reputation: 0
rename localhost in redhat 9


I installed Samba on RH 9 and can see my redhat box on my XP box but when I try to access it I get a message thaqt says dublicate name exists on network

I would assume this is because the redhat name is localhost. I need to know how to change it. I read a post that said go to /etc/sysconfig/network and change the hostname I tried that and got permisson denied, I am installing updates but I wouldnt think that would effect it?
 
Old 01-10-2004, 04:57 PM   #2
nightjar
Member
 
Registered: May 2002
Location: Argentina
Distribution: Mandrake 9.2
Posts: 177

Rep: Reputation: 30
it's not the problem.
Edit /etc/host and set up your network with address and full domain name (i.e.: 127.0.0.1 localhost.localdomain localhost)
Edit /etc/samba/smb.conf and take a look of the parameters
Change what you need, save it (as root) and run testparm watching if all is OK.
Type /etc/rc.d/init.d/smb restart
Type here the results
 
Old 01-10-2004, 05:00 PM   #3
g-rod
Member
 
Registered: Dec 2003
Location: Long Island, NY USA
Distribution: RedHat, SUSE
Posts: 336

Rep: Reputation: 30
What nightjar says is 100% correct, but you need to do it as root not a regular user.
 
Old 01-10-2004, 06:17 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,696

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Actually what nightjar posted isn't really 100% correct or maybe I misread the problem. I think soonerdm is saying that he can not access the RH box from XP. /etc/hosts file just resolves IP addresses to names on the linux PC which does not effect the windows PC.

samba uses the hostname of the PC as default (which is localhost in this case) unless there is a netbios name= entry in the smb.conf file.

If you want to change the computer hostname then editing the /etc/sysconfig/network file will work but you need to be logged in as root to edit files in /etc/ directory.

Either change the hostname or adding a netbios name in your smb.conf file should fix the problem.

Be sure to restart samba for either method.

For documentation on samba see www.samba.org

Last edited by michaelk; 01-10-2004 at 06:19 PM.
 
Old 01-10-2004, 06:35 PM   #5
soonerdm
LQ Newbie
 
Registered: Oct 2003
Location: Sooner Nation
Distribution: Redhat 9
Posts: 13

Original Poster
Rep: Reputation: 0
You guys are extremely helpful and I appriciate it. But I am getting a "Permission denied"

in the SHELL Konsole I get a prompt
[root@localhost root]# /etc/sysconfig/network

and I get this in return

bash: /etc/sysconfig/network: Permission denied

I am at a loss.
 
Old 01-10-2004, 06:36 PM   #6
nightjar
Member
 
Registered: May 2002
Location: Argentina
Distribution: Mandrake 9.2
Posts: 177

Rep: Reputation: 30
Re: rename localhost in redhat 9

Quote:
Originally posted by soonerdm
... I get a message thaqt says dublicate name exists on network

I would assume this is because the redhat name is localhost.
It's not correct.
He cant access because he has a wrong setup of the samba.
I don 't know how security is setting, what is their workgroup and the permissions of the browseable (or not) dirs of linux, if its are publics, etc

The correct way is edit the smb.conf (as root) and change what he want (and need) to change.

Then comment us
 
Old 01-10-2004, 06:46 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,696

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
The /etc/sysconfig/network is a configuration file and can not be executed.

Use a text editor like emacs, vi or pico to make any changes. Try
emacs /etc/sysconfig/network
ctrl-x ctrl-s to save changes
ctrl-x ctrl-c to exit

I'm sure that samba will have to be tweaked some.

Do you see the RH box in whatever XP has for network neighborhood?

Last edited by michaelk; 01-10-2004 at 06:48 PM.
 
Old 01-10-2004, 07:05 PM   #8
nightjar
Member
 
Registered: May 2002
Location: Argentina
Distribution: Mandrake 9.2
Posts: 177

Rep: Reputation: 30
Quote:
Originally posted by soonerdm
You guys are extremely helpful and I appriciate it. But I am getting a "Permission denied"

in the SHELL Konsole I get a prompt
[root@localhost root]# /etc/sysconfig/network

and I get this in return

bash: /etc/sysconfig/network: Permission denied

I am at a loss.
Idont know what a u doing but I suppose that u are running network.



We said that you must edit it
 
Old 01-10-2004, 07:10 PM   #9
soonerdm
LQ Newbie
 
Registered: Oct 2003
Location: Sooner Nation
Distribution: Redhat 9
Posts: 13

Original Poster
Rep: Reputation: 0
Thx again. You will have to remeber I have about 2 hours experence with UNIX/LINUX and am trying to learn.

So I got the name changed and now it tells me I cant access it because

the network path was not found.

And yes I see the redhat box in the other three XP machines I have in the network neighborhood

Last edited by soonerdm; 01-10-2004 at 07:16 PM.
 
Old 01-10-2004, 07:22 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,696

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Make sure the workgroup name in smb.conf file matches XP workgroup name.

In a DOS command box try
net view
or
net view \\ipaddr (Use IP address of the linux PC)


I had a similar problem when my Dad's computer had a hard drive failure. My fix was to add the IP address, computer name to the XP's lmhosts file.
This will require a static IP address for the linux PC.

Last edited by michaelk; 01-10-2004 at 07:23 PM.
 
Old 01-10-2004, 07:43 PM   #11
nightjar
Member
 
Registered: May 2002
Location: Argentina
Distribution: Mandrake 9.2
Posts: 177

Rep: Reputation: 30
Not a problem.

Remember from this point that windoze usually establish relation with linux via samba. The name of ur computer is not the problem; but the IP, the workgroup, the share dirs, which hosts are allowed, etc. that ever u must set up via samba (/etc/samba/smb.conf).

Localhost is the default route to access the computer you are using, not a computer name . Then you dont must change this parameter of the network file

Last edited by nightjar; 01-10-2004 at 08:02 PM.
 
Old 01-10-2004, 08:10 PM   #12
nightjar
Member
 
Registered: May 2002
Location: Argentina
Distribution: Mandrake 9.2
Posts: 177

Rep: Reputation: 30
'till tomorrow !!!
 
Old 01-11-2004, 05:11 PM   #13
soonerdm
LQ Newbie
 
Registered: Oct 2003
Location: Sooner Nation
Distribution: Redhat 9
Posts: 13

Original Poster
Rep: Reputation: 0
Okay so I see the redhat machine in my network neighborhood when I click on "VIEW NETWORK COMPUTERS" When I click on the redhat box I get the error Network path not found.

I used the net view \\192.168.2.103 and I got

"System error 53 has occured
The Network path was not found"

so I went back into the smb.conf and uncommented the
host allow = 192.168.1. 192.168.2. 127.

ideas?

 
Old 01-11-2004, 05:50 PM   #14
nightjar
Member
 
Registered: May 2002
Location: Argentina
Distribution: Mandrake 9.2
Posts: 177

Rep: Reputation: 30
but , what is IP address of the linux box?


Last edited by nightjar; 01-11-2004 at 05:55 PM.
 
Old 01-11-2004, 05:58 PM   #15
soonerdm
LQ Newbie
 
Registered: Oct 2003
Location: Sooner Nation
Distribution: Redhat 9
Posts: 13

Original Poster
Rep: Reputation: 0
192.168.2.103 is the address. I got it using ipconfig or some command like that from the linux terminal
 
  


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
rename file from C program on redhat 9, how to? syseeker Programming 2 11-17-2005 07:03 AM
Change localhost name in username@localhost n175uj Linux - Newbie 4 07-01-2005 08:25 PM
Message from syslogd@localhost localhost kernel: Disabling IRQ #21 ylts Linux - Hardware 0 02-26-2005 08:01 AM
Redhat - localhost login Onimoto Linux - Software 1 05-15-2004 10:35 AM
Can not access localhost from local machine - RedHat 9 acepukas Linux - Networking 3 12-09-2003 01:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:09 PM.

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