# Changing hostname

**URL:** <https://discourse.chef.io/t/changing-hostname/1380>\
**Category:** Chef Infra (archive)\
**Created:** [March 16, 2010, 5:26am UTC](https://discourse.chef.io/t/changing-hostname/1380 "2010-03-16T05:26:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joshua\_Miller](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/joshua_miller/32/212_2.png) [@Joshua\_Miller](https://discourse.chef.io/u/Joshua_Miller)\
**Post date:** [March 16, 2010, 5:26am UTC](https://discourse.chef.io/t/changing-hostname/1380/1 "2010-03-16T05:26:24Z")

</div>

Hello,

Guys I am trying to change my host name on a box but now I get

root@test-101-03:~# chef-client  
/usr/lib/ruby/1.8/net/http.rb:2097:in `error!': 401 "Unauthorized" (Net::HTTPServerException) from /usr/lib/ruby/1.8/chef/rest.rb:233:in`run\_request’  
from /usr/lib/ruby/1.8/chef/rest.rb:95:in `post_rest' from /usr/lib/ruby/1.8/chef/client.rb:243:in`authenticate’  
from /usr/lib/ruby/1.8/chef/client.rb:79:in `run' from /usr/lib/ruby/1.8/chef/application/client.rb:186:in`run\_application’  
from /usr/lib/ruby/1.8/chef/application/client.rb:178:in `loop' from /usr/lib/ruby/1.8/chef/application/client.rb:178:in`run\_application’  
from /usr/lib/ruby/1.8/chef/application.rb:57:in `run’  
from /usr/bin/chef-client:25  
root@test-101-03:~#  
root@test-101-03:~# chef-client -v  
Chef: 0.7.14  
root@test-101-03:~#

for some reason I though nodes used another system to track nodes once they are registered but it seems I am wrong. Is there a suggested way to change a hostname?

Thank you,

Joshua

---

<div class="post-metadata">

**Author:** ![Joshua\_Timberman](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/joshua_timberman/32/424_2.png) [@Joshua\_Timberman](https://discourse.chef.io/u/Joshua_Timberman)\
**Post date:** [March 16, 2010, 2:31pm UTC](https://discourse.chef.io/t/changing-hostname/1380/2 "2010-03-16T14:31:02Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Hello!

You need to delete the registration on the server and have the client  
reregister/authorize. The OpenID registration is tied to the hostname  
(FQDN) by default.

On Mar 15, 2010, at 11:26 PM, Joshua Miller wrote:

> Hello,
> 
> Guys I am trying to change my host name on a box but now I get
> 
> root@test-101-03:~# chef-client  
> /usr/lib/ruby/1.8/net/http.rb:2097:in `error!': 401 "Unauthorized" (Net::HTTPServerException) from /usr/lib/ruby/1.8/chef/rest.rb:233:in `run\_request'  
> from /usr/lib/ruby/1.8/chef/rest.rb:95:in `post_rest' from /usr/lib/ruby/1.8/chef/client.rb:243:in `authenticate'  
> from /usr/lib/ruby/1.8/chef/client.rb:79:in `run' from /usr/lib/ruby/1.8/chef/application/client.rb:186:in `run\_application'  
> from /usr/lib/ruby/1.8/chef/application/client.rb:178:in `loop' from /usr/lib/ruby/1.8/chef/application/client.rb:178:in `run\_application'  
> from /usr/lib/ruby/1.8/chef/application.rb:57:in `run'  
> from /usr/bin/chef-client:25  
> root@test-101-03:~#  
> root@test-101-03:~# chef-client -v  
> Chef: 0.7.14  
> root@test-101-03:~#
> 
> for some reason I though nodes used another system to track nodes  
> once they are registered but it seems I am wrong. Is there a  
> suggested way to change a hostname?
> 
> Thank you,
> 
> Joshua

* * *

Opscode, Inc  
Joshua Timberman, Senior Solutions Engineer  
C: 720.334.RUBY E: [joshua@opscode.com](mailto:joshua@opscode.com)

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.10 (Darwin)

iEYEARECAAYFAkufliYACgkQO97WSdVpzT169wCaAj/Btq2dtumzVhzH8TAT7mJc  
uXgAoJh+/xajJmSuNhBFXhbraok17xJI  
=AlyM  
-----END PGP SIGNATURE-----
