systemd ships with a policykit file which allows the system administrator to set the hostname.
The policykit file is located here: /usr/share/polkit-1/actions/org.freedesktop.hostname1.policy and in the systemd source here: https://github.com/systemd/systemd/blob/master/src/hostname/org.freedesktop.hostname1.policy.in This behaviour is by design. Please file a bug with the upstream systemd project if you believe this should be changed. Thanks. ** Changed in: systemd (Ubuntu) Status: New => Won't Fix -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1637030 Title: hostnamectl changes hostname without password To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1637030/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs