LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-06-2004, 09:47 PM   #1
Sathington
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 \\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!
 
Old 04-07-2004, 02:52 AM   #2
scott_R
Member
 
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
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...
 
Old 04-07-2004, 02:58 AM   #3
makko
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, 04:35 AM   #4
nleroux
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

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

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


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:52 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