LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   change hostname from localhost in samba (https://www.linuxquestions.org/questions/linux-newbie-8/change-hostname-from-localhost-in-samba-167107/)

Sathington 04-06-2004 09:47 PM

change hostname from localhost in samba
 
Here is a new to samba question.....

from my windows PC, if I try going to \\localhost it says I could not connect because a duplicate name is on the network (and it is not) there are only 2 computers on the network. If I got to \\192.168.1.102 (the ip of the Linux computer) I can access all the shares I set up no problems!

where can I chane the name from "localhost" to "linux" or something more distinguishing like that? and while I'm at that, where also can I change its workgroup from "MDKGROUP" to just "WORKGROUP"

thanks for helping a newb!

scott_R 04-07-2004 02:52 AM

In /etc/sysconfig, you should have a file called 'network'. It's a simple executable script, and in it's most basic form, looks like this:

#cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=linux

I know 9.1 didn't allow you to set up a hostname if you didn't set up networking through it's helper (which I couldn't do, because Linksys is kind enough to make me compile the ndiswrapper drivers to use the windows drivers, because broadcom is a chintzy company). Anyway, it's harder finding the fix than it is to fix it. I prefer some other distro's setups: /etc/hostname In those cases, just edit that file, and it's obvious which one to change. Oh well... :)

makko 04-07-2004 02:58 AM

You can can also edit /etc/hosts and give whatever hostname you want to go with your ip-adress.

nleroux 04-07-2004 04:35 AM

You can edit /etc/samba/smb.conf and change the lines:

workgroup = Yourworkgroup

server string = your machine name

HTH

Sathington 04-07-2004 05:27 AM

Thanks guys....that was way easy!


All times are GMT -5. The time now is 03:02 AM.