Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-06-2004, 10:47 PM   #1
LQ Newbie
Registered: Mar 2004
Distribution: Slackware 9.1
Posts: 12

Rep: Reputation: 0
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 \\ (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!
Old 04-07-2004, 03:52 AM   #2
Registered: Jul 2003
Location: Brighton, Michigan, USA
Distribution: Lots of distros in the past, now Linux Mint
Posts: 748

Rep: Reputation: 31
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

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...
Old 04-07-2004, 03:58 AM   #3
LQ Newbie
Registered: Apr 2004
Location: Earth
Distribution: Slackware 10, FreeBSD 4.10
Posts: 19

Rep: Reputation: 0
You can can also edit /etc/hosts and give whatever hostname you want to go with your ip-adress.
Old 04-07-2004, 05:35 AM   #4
LQ Newbie
Registered: Apr 2004
Posts: 3

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

workgroup = Yourworkgroup

server string = your machine name

Old 04-07-2004, 06:27 AM   #5
LQ Newbie
Registered: Mar 2004
Distribution: Slackware 9.1
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks guys....that was way easy!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Change localhost jdmml Fedora 10 07-02-2011 12:18 PM
lpd - Get_Local_Host : HostName 'LocalHost' bad chanmy8 Linux - General 4 03-02-2006 04:13 PM
Change localhost name in username@localhost n175uj Linux - Newbie 4 07-01-2005 09:25 PM
How to change prompt hostname "localhost"? Arodef Fedora 3 08-02-2004 07:45 AM
hostname resetting to localhost on unclean reboot brian_h1 Linux - Networking 0 05-11-2004 09:18 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:18 PM.

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