Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28

Thread: Error calling StartServiceByName for org.freedesktop.PolicyKit1

  1. #21

    Default Re: Error calling StartServiceByName for org.freedesktop.PolicyKit1

    What ultimately got me into this issue was an accidental deletion of most of the files in /etc.

    Then I restored what I thought was a backup, but was actually a quite old version of the files.

    I went through YaST and found everything I could that had files in /etc then reinstalled these packages with zypper in -f

    From the referenced directories:
    Code:
    /usr/share/polkit-1/rules.d # ls -al
    total 16
    drwx------ 2 polkitd root 4096 May 16 13:29 .
    drwxr-xr-x 4 root    root 4096 Sep  2 17:20 ..
    -rw-r--r-- 1 root    root  965 Jul 23 06:49 60-org.freedesktop.Flatpak.rules
    -rw-r--r-- 1 root    root  330 Sep  2 17:20 60-systemd-networkd.rules
    
    
    usr/share/polkit-1/rules.d # cat 60-org.freedesktop.Flatpak.rules 
    polkit.addRule(function(action, subject) {
        if ((action.id == "org.freedesktop.Flatpak.app-install" ||
             action.id == "org.freedesktop.Flatpak.runtime-install"||
             action.id == "org.freedesktop.Flatpak.app-uninstall" ||
             action.id == "org.freedesktop.Flatpak.runtime-uninstall" ||
             action.id == "org.freedesktop.Flatpak.modify-repo" ||
             action.id == "org.freedesktop.Flatpak.app-update" ||
             action.id == "org.freedesktop.Flatpak.runtime-update" ||
             action.id == "org.freedesktop.Flatpak.appstream-update") &&
            subject.active == true && subject.local == true &&
            subject.isInGroup("wheel")) {
                return polkit.Result.YES;
        }
    
    
        return polkit.Result.NOT_HANDLED;
    });
    
    
    polkit.addRule(function(action, subject) {
        if (action.id == "org.freedesktop.Flatpak.override-parental-controls") {
                return polkit.Result.AUTH_ADMIN;
        }
    
    
        return polkit.Result.NOT_HANDLED;
    });
    
    
    /usr/share/polkit-1/rules.d # cat 60-systemd-networkd.rules 
    // Allow systemd-networkd to set timezone and transient hostname
    polkit.addRule(function(action, subject) {
        if ((action.id == "org.freedesktop.hostname1.set-hostname" ||
             action.id == "org.freedesktop.timedate1.set-timezone") &&
            subject.user == "systemd-network") {
            return polkit.Result.YES;
        }
    });
    Code:
    /etc/polkit-1/rules.d # ls -al
    total 76
    drwx------ 2 polkitd root  4096 Oct 25 22:00 .
    drwxr-xr-x 3 root    root  4096 May 16 13:29 ..
    -rw-r--r-- 1 root    root   322 Oct 25 22:00 50-default.rules
    -rw-r--r-- 1 root    root 61502 Oct 17 10:30 90-default-privs.rules
    
    
    /etc/polkit-1/rules.d # cat 50-default.rules 
    /* -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- */
    
    
    // DO NOT EDIT THIS FILE, it will be overwritten on update
    //
    // Default rules for polkit
    //
    // See the polkit(8) man page for more information
    // about configuring polkit.
    
    
    polkit.addAdminRule(function(action, subject) {
        return ["unix-user:0"];
    });
    and

    the 90-default-privs.rules file is exactly the same as on a secondary SSD that I have been booing this same system with to test.

  2. #22
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,905
    Blog Entries
    2

    Default Re: Error calling StartServiceByName for org.freedesktop.PolicyKit1

    Looking over this thread again,
    I don't see that the question was ever asked if you're installed on BTRFS.
    If you are, you can fix your problem easily and properly by simply doing a rollback to before your incident.
    That should restore all the files you deleted by accident.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  3. #23

    Default Re: Error calling StartServiceByName for org.freedesktop.PolicyKit1

    I am installed with ext4, not btrfs.

    Booted with efi.

  4. #24
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,905
    Blog Entries
    2

    Default Re: Error calling StartServiceByName for org.freedesktop.PolicyKit1

    Maybe solution is to do a new install (not a re-install over the top of existing) and migrate your data to the replacement.
    If you have enough room on your hard drive, you can even multi-boot so it's a simple copy/paste of your data, then you can take your time and make sure the new install is working fine before you remove the old install to recover your disk space.

    There have been numerous forum threads over the years on the details of doing this, but if you have specific questions or run into issues, just post.
    Although some have used the YaST Partitioner to re-size your partitions, I personally recommend using Gparted Live instead.

    And, of course, make sure you have a good backup or copy of everything that's valuable.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  5. #25

    Default Re: Error calling StartServiceByName for org.freedesktop.PolicyKit1

    The new install is a maybe option.

    I would really like to just fix this issue.

    I would think there should be something in some log somewhere that could give a definitive pointer as to the impeding issue.

    Fortunately, all major data is on a second physical device, with just a few items on the boot device, but a total rebuild is something I would like to not have to do if absolutely possible.

  6. #26
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,905
    Blog Entries
    2

    Default Re: Error calling StartServiceByName for org.freedesktop.PolicyKit1

    Problem is that computing can get very complex when you scratch too deep beneath the surface, today a lot of that complexity is shielded from humans so we can manage what we can.

    Problem is, maybe you did more damage than you thought, so there might be layers that need to be inspected looking for that needle in a haystack.
    Or, you haven't done a really complete job restoring what went missing.

    Maybe one thing you could do is
    copy the /etc from another machine or install another instance side by side with your existing system.
    Run something like tree to create a listing of everything in both your existing /etc and a default /etc and "diff" them to determine what is different.

    That would at least determine if you've missed any files.
    But, it won't compare anything outside of /etc

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  7. #27

    Default Re: Error calling StartServiceByName for org.freedesktop.PolicyKit1

    So, I may have attained success at last.


    From the secondary SSD that was running correctly, I copied the entire /etc (making a backup of my current).


    I had to copy over passwd, groups, and shadow from my previous /etc, then booting was successful, but the GDM login did not show the defined (2) users (<user. & Backup).
    Successful MATE desktop, but Still polkit would not start, but the errors were quite different:
    Code:
    /var/log/messages
    
    
    systemd[1]: polkit.service: Service lacks both ExecStart= and ExecStop= setting. Refusing.
    
    
    dbus-daemon[1037]: [system] Activation via systemd failed for unit 'polkit.service': Unit polkit.service is not loaded properly: Invalid argument.

    Reinstalled these packages
    Code:
    zypper in -f gpg2
    zypper in -f gconf-polkit
    zypper in -f mate-polkit
    zypper in -f polkit-default-privs
    zypper in -f systemd

    I now get the normal GDM login screen. pkaction now returns
    Code:
    # pkaction |grep login
    org.freedesktop.accounts.set-login-option
    org.freedesktop.login1.attach-device
    org.freedesktop.login1.flush-devices
    org.freedesktop.login1.hibernate
    org.freedesktop.login1.hibernate-ignore-inhibit
    org.freedesktop.login1.hibernate-multiple-sessions
    org.freedesktop.login1.inhibit-block-idle
    org.freedesktop.login1.inhibit-block-shutdown
    org.freedesktop.login1.inhibit-block-sleep
    org.freedesktop.login1.inhibit-delay-shutdown
    org.freedesktop.login1.inhibit-delay-sleep
    org.freedesktop.login1.inhibit-handle-hibernate-key
    org.freedesktop.login1.inhibit-handle-lid-switch
    org.freedesktop.login1.inhibit-handle-power-key
    org.freedesktop.login1.inhibit-handle-suspend-key
    org.freedesktop.login1.lock-sessions
    org.freedesktop.login1.manage
    org.freedesktop.login1.power-off
    org.freedesktop.login1.power-off-ignore-inhibit
    org.freedesktop.login1.power-off-multiple-sessions
    org.freedesktop.login1.reboot
    org.freedesktop.login1.reboot-ignore-inhibit
    org.freedesktop.login1.reboot-multiple-sessions
    org.freedesktop.login1.set-reboot-to-firmware-setup
    org.freedesktop.login1.set-self-linger
    org.freedesktop.login1.set-user-linger
    org.freedesktop.login1.set-wall-message
    org.freedesktop.login1.suspend
    org.freedesktop.login1.suspend-ignore-inhibit
    org.freedesktop.login1.suspend-multiple-sessions
    org.gnome.controlcenter.remote-login-helper

    USB and external eSATA disks are now mountable via the desktop.


    The morale of this epic: be careful house cleaning in /etc and have a backup from a fully working system.


    Thanks to all of you for your responses and direction.

  8. #28
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,905
    Blog Entries
    2

    Default Re: Error calling StartServiceByName for org.freedesktop.PolicyKit1

    Congrats.
    Knew you could do it!

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Page 3 of 3 FirstFirst 123

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •