LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] PC's Name.

[ILUG] PC's Name.

Alan Sobey ags-lists at esatclear.ie
Sat May 20 17:59:14 IST 2000


> I have a Linux box on a NT network, the default name of the Linux
> machine is apc088, how can I change this to follow the nameing
> convention used by my network ??

The hostname of the linux box and the name with which it appears on a
windows network (the netbios name) don't necessarily have to be the
same.

To set the netbios name edit /etc/smb.conf so that you have a
line reading:

netbios name = whatever

To change the linux box's name you could use "hostname -s whatever".
But I don't think it's too reliable.  You could try

rgrep -H currentname /etc/* 2>/dev/null | cut -d: -f1 | sort | uniq

or 

grep -Hr currentname /etc/* 2>/dev/null | cut -d: -f1 | sort | uniq

to show you which scripts reference your current hostname.  If you
change your current name in these scripts and reboot, you should have
a new hostname.

Btw, for your distro there may be a simpler way to change the hostname
but the above should work for all(most?).  In general though, it's
probably best not to rename an existing machine unless necessary.

hth,
Alan.





More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell