why I can't change my hostname?

tal

Verified User
Joined
Oct 8, 2005
Messages
18
hey all
i on freebsd server
i try to change the hostname, like this:
hostname mydomainname.com

but i get this error
hostname: sethostname: Operation not permitted


thanks.
 
Last edited:
What part of the link do you not understand? The part where you have to edit the rc.conf file? Do you not know how to edit a file?
 
sure!
i'll tell you what i understood and if i have a mistake, please tell me.
so, i have to create a file - rc.conf.site
and write in this file
defaultrouter="10.1.1.254"
saver="daemon"
blanktime="100"

and edit the rc.conf:
/etc/rc.conf.site
hostname="node15.example.com"
network_interfaces="fxp0 lo0"
ifconfig_fxp0="inet 10.1.1.1"

am i right?
after i edited the files, what i have to do?


thanks!
 
I believe you quoted the examples correctly.

No look at the first 2 sentences:

The principal location for system configuration information is within /etc/rc.conf. This file contains a wide range of configuration information, principally used at system startup to configure the system.

These files are read at startup. So in order to make use of these files you need to reboot. Make sure you have somebody there physically at the machine in case something goes wrong.

I don't use freebsd. I am just telling you the site said.
 
Have you tried changing the hostname through the DirectAdmin control panel? Once DirectAdmin is installed simply changing it in the OS isn't enough if you want DirectAdmin to run properly.

Jeff
 
Back
Top