Updating VA hostname

Dear Sailors,
We would like to change hostname of virtual appliances we have. Apparently only root has rights to edit the /etc/hostname. How can we update it?

Hi @gkiris1 ,
you should be able to use hostnamectl for that.

Hi Oliver,

Thanks for prompt reply. That doesn’t work either. it asks for root password.

sailpoint@sailpoint-va ~ $ hostnamectl hostname test  
==== AUTHENTICATING FOR org.freedesktop.hostname1.set-static-hostname ====
Authentication is required to set the statically configured local hostname, as well as the pretty hostname.
Authenticating as: root
Password: 
polkit-agent-helper-1: pam_authenticate failed: Permission denied```

What does $ sudo -l | grep hostname show you?

Should be (ALL) NOPASSWD: /usr/bin/hostnamectl

Try sudo hostnamectl

trying with sudo worked! thank you

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.