Can't change hostname

crashoveride

Registered
I am trying to change the hostnames on a few computers. Currently they all have differnt computer names, but all have the same hostname. I have tried in the terminal window: hostname -s host.yourdomain.com (replacing host
w/computername I want, and replacing yourdomain, with my actual domain name) Are there any other ways to do this (with out formating the computer)

Thanks,
 
You are over thinking the problem. however don't worry, all geeks tend to do that. Open System Preferences and go to the sharing pane and change the computer name, then reboot. Problem solved.
 
crashoveride:
you can't change the hostname that way unless you are the super-user; that means you'll have to be logged in as an administrator and prefix the command with 'sudo' ;; and the -s option has no place in the command when changing the hostname as it's only for formatting output.

Satcomer:
There's no need to reboot after having changed hostname; the change is effective immediately no matter whether you change it from Terminal or System Preferences. Also, doing this from Terminal can have advantages, as you can ssh to the other computers and do the change remotely.
 
I am logged in as administrator (only acount on the computer right now)
I type in: 'sudo' ;hostname host.yourdomain..com;
(replacing host w/computername I want, and replacing yourdomain, with my actual domain name)
I get sethostname; Operation not permitted
 
Back
Top