General Linux > Samba > Issue
<<
12 of 98
>>
Issue:
How do I change my hostname or the machine name?
Resolution:
IP hostnames or machine names can be changed dynamically with the command
hostname and persistently by setting the
HOSTNAME environment variable in
/etc/sysconfig/network.
You can also run the
redhat-config-network command, click on the "DNS" tab, and change the "Hostname" field.
If samba is running and you wish to set the Netbios name of the system to something other than the IP hostname, this may be accomplished by setting the
netbios name parameter in the file
/etc/samba/smb.conf. Add a line in this file that denotes:
netbios name = <SERVER NAME:>, where
<SERVER NAME:> is the name you want Windows to see your machine as. Most people use the system's hostname.
Here is an example on changing the hostname from the command line from
jaws to
peahi. Note that just running
hostname will display your current hostname.
# hostname
jaws.example.com
# hostname peahi.example.com
# hostname
peahi.example.com
|
Here is an example on changing the hostname in the
/etc/sysconfig/network file from
jaws to
peahi. Use your preferred text editor to make the changes.
# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=jaws.example.com
# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=peahi.example.com
|
General Linux
>
Samba
> Issue
<<
12
of
98
>>