You are not logged in.

#1 2012-10-28 20:45:52

wprater
Member
Registered: 2012-10-28
Posts: 6

Setting new hostname: failed to issue method call

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

#2 2012-10-28 22:45:44

ravster
Member
From: Queen's U, Kingston, Canada
Registered: 2004-05-02
Posts: 285
Website

Re: Setting new hostname: failed to issue method call

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

#3 2012-10-28 22:58:30

opensrcrox
Member
Registered: 2012-08-10
Posts: 32

Re: Setting new hostname: failed to issue method call

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

#4 2012-10-29 08:57:28

wprater
Member
Registered: 2012-10-28
Posts: 6

Re: Setting new hostname: failed to issue method call

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

#5 2012-10-30 11:57:41

padremayi
Member
Registered: 2012-06-29
Posts: 49

Re: Setting new hostname: failed to issue method call

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

#6 2012-11-04 20:52:20

zarac
Member
Registered: 2010-06-23
Posts: 2

Re: Setting new hostname: failed to issue method call

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

#7 2012-11-04 21:07:50

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,095
Website

Re: Setting new hostname: failed to issue method call

You need to actually boot with systemd for the *ctl tools to work.

Offline

#8 2012-11-19 23:37:14

netawater
Member
Registered: 2008-08-01
Posts: 35

Re: Setting new hostname: failed to issue method call

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

Offline

#9 2012-11-21 14:35:09

nkuflk
Member
Registered: 2012-11-21
Posts: 1

Re: Setting new hostname: failed to issue method call

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??

Offline

#10 2012-11-21 14:57:03

bslackr
Member
Registered: 2012-01-27
Posts: 131

Re: Setting new hostname: failed to issue method call

nkuflk wrote:
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

#11 2013-01-10 17:33:28

TDKVerbatim
Member
From: South Africa
Registered: 2012-02-12
Posts: 4

Re: Setting new hostname: failed to issue method call

padremayi wrote:

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

Board footer

Powered by FluxBB