You are not logged in.
Pages: 1
Topic closed
Trying to set the new hostname with the `hostnamectl` util provides the following error. Ideas?
# hostnamectl set-hostname my-new-hostname
Failed to issue method call: The name org.freedesktop.PolicyKit1 was not provided by any .service files
# systemctl --version
systemd 195
arch
+PAM -LIBWRAP -AUDIT -SELINUX -IMA -SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ
Last edited by wprater (2012-10-28 22:46:54)
Offline
I'm getting a similar error
Failed to issue method call: Launch helper exited with unknown return code 1
I'm using the systemd-195-2 package.
Offline
Do you have the latest polkit installed?
/usr/share/dbus-1/system-services/org.freedesktop.PolicyKit1.service is owned by polkit 0.107-4
Offline
I've upgrade the polkit package and now see this
# hostnamectl set-hostname example
Failed to issue method call: Access denied
Last edited by wprater (2012-10-29 08:57:42)
Offline
Try this, for me it worked:
echo myhostname > /etc/hostname
From: Beginners Guide - Hostname
NOTE: /etc/hostname must be owned by root:root and must have permissions set to 644
Last edited by padremayi (2012-10-30 12:03:06)
Offline
I had the same issue. Resolved by installing polkit (and rebooting).
[root@localhost zarac]# hostnamectl set-hostname stan
Failed to issue method call: The name org.freedesktop.PolicyKit1 was not provided by any .service files
[root@localhost zarac]# localectl set-locale LANG="en_US.utf8"
Failed to issue method call: The name org.freedesktop.PolicyKit1 was not provided by any .service files
Offline
You need to actually boot with systemd for the *ctl tools to work.
yes, append the following to your kernel line: init=/usr/lib/systemd/systemd
Offline
falconindy wrote:You need to actually boot with systemd for the *ctl tools to work.
yes, append the following to your kernel line: init=/usr/lib/systemd/systemd
how to append the command to kernel??
Offline
netawater wrote:falconindy wrote:You need to actually boot with systemd for the *ctl tools to work.
yes, append the following to your kernel line: init=/usr/lib/systemd/systemd
how to append the command to kernel??
This depends on your bootloader. Are you using grub?
Offline
Try this, for me it worked:
echo myhostname > /etc/hostname
I had the same issue (had already migrated to systemd) this worked for me
"With every breath that I am given I will sing Salvation's song" - Stuart Townend
Offline
Even though the approaches mentioned before work well, I wanted to leave this here in case someone ends up in this thread and wants to use the systemd approach.
I was having a similar issue in a Debian Jessie installation in a Raspberry Pi.
$ hostnamectl set-hostname slowraspberry
Could not set property: The name org.freedesktop.PolicyKit1 was not provided by any .service files
I installed policykit-1 (in Arch that's polkit), and then I would get:
$ hostnamectl set-hostname slowraspberry
Could not set property: Access denied
Simply adding sudo did the trick. Afterwards, I would get an annoying warning everytime I used sudo.
sudo: unable to resolve host slowraspberry
Just needed to reboot to make to propagate the change in all the right places.
Additionally, I needed to update //etc/hosts entries with new hostname, so that the local addresses can resolve with the new hostname.
Last edited by chibby0ne (2018-03-28 11:51:16)
Offline
Thanks for sharing, however most of these would not have the same relevance on an up to date Arch system and the original issue arose during the transition phase to systemd.
Please don't necrobump in the future.
https://wiki.archlinux.org/index.php/Co … bumping.22
Closing.
Offline
Pages: 1
Topic closed