Keine Berechtigungen für Software Center

7

Ich habe heute gerade Ubuntu 13.04 (ab 11.04) installiert. Und ich kann das Software Center vom Dash nicht verwenden. Wenn ich es vom Dash aus starte, heißt es immer, dass ich nicht genügend Berechtigungen habe, um Software zu installieren. Aber mein Benutzer ist in der Gruppe sudo adm und lpadmin, wie es sein sollte. Ich kann es nur verwenden mit: "sudo software-center" in der Konsole. Warum fragt es nicht einfach wie immer nach meinem Passwort? Was ist das Problem hier?

Chris
quelle

Antworten:

3

Wenn Sie versehentlich etwas in der /usr/share/polkit-1/actions/org.debian.apt.policyDatei haben:

...

  <action id="org.debian.apt.install-or-remove-packages">
    <description gettext-domain="aptdaemon">Install or remove packages</description>
    <message gettext-domain="aptdaemon">To install or remove software, you need to authenticate.</message>
    <defaults>
      <allow_any>no</allow_any>
      <allow_inactive>no</allow_inactive>
      <allow_active>no</allow_active>
    </defaults>
  </action>

...

Sie erhalten die folgende Warnung, wenn Sie versuchen, etwas aus dem Ubuntu Software Center zu installieren:

Warnung

Sie können auch die Details aus der Warnung überprüfen.

Überprüfen Sie also die /usr/share/polkit-1/actions/org.debian.apt.policyDatei und stellen Sie sicher, dass sie so aussieht:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
 "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
<policyconfig>

  <vendor>Apt Daemon</vendor>
  <vendor_url>http://launchpad.net/aptdaemon/</vendor_url>
  <icon_name>package-x-generic</icon_name>

  <action id="org.debian.apt.get-trusted-vendor-keys">
    <description gettext-domain="aptdaemon">List keys of trusted vendors</description>
    <message gettext-domain="aptdaemon">To view the list of trusted keys, you need to authenticate.</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
  </action>

  <action id="org.debian.apt.clean">
    <description gettext-domain="aptdaemon">Remove downloaded package files</description>
    <message gettext-domain="aptdaemon">To clean downloaded package files, you need to authenticate.</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
  </action>

  <action id="org.debian.apt.change-config">
    <description gettext-domain="aptdaemon">Change software configuration</description>
    <message gettext-domain="aptdaemon">To change software settings, you need to authenticate.</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
  </action>

  <action id="org.debian.apt.change-repository">
    <description gettext-domain="aptdaemon">Change software repository</description>
    <message gettext-domain="aptdaemon">To change software repository settings, you need to authenticate.</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
  </action>

  <action id="org.debian.apt.install-file">
    <description gettext-domain="aptdaemon">Install package file</description>
    <message gettext-domain="aptdaemon">To install this package, you need to authenticate.</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
  </action>

  <action id="org.debian.apt.update-cache">
    <description gettext-domain="aptdaemon">Update package information</description>
    <message gettext-domain="aptdaemon">To update the software catalog, you need to authenticate.</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
  </action>

  <action id="org.debian.apt.install-or-remove-packages">
    <description gettext-domain="aptdaemon">Install or remove packages</description>
    <message gettext-domain="aptdaemon">To install or remove software, you need to authenticate.</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
  </action>

  <action id="org.debian.apt.install-packages.high-trust-repo">

    <description gettext-domain="aptdaemon">Install software from a high-trust whitelisted repository.</description>
    <message gettext-domain="aptdaemon">To install software, you need to authenticate.</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
  </action>

  <action id="org.debian.apt.install-packages-from-new-repo">

    <description gettext-domain="aptdaemon">Add a new repository and install packages from it</description>
    <message gettext-domain="aptdaemon">To install software from a new source, you need to authenticate.</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
  </action>

  <action id="org.debian.apt.install-purchased-packages">

    <description gettext-domain="aptdaemon">Add a new repository of purchased software and install packages from it</description>
    <message gettext-domain="aptdaemon">To install purchased software, you need to authenticate.</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
  </action>

  <action id="org.debian.apt.upgrade-packages">
    <description gettext-domain="aptdaemon">Upgrade packages</description>
    <message gettext-domain="aptdaemon">To install updated software, you need to authenticate.</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
  </action>

  <action id="org.debian.apt.cancel-foreign">
    <description gettext-domain="aptdaemon">Cancel the task of another user</description>
    <message gettext-domain="aptdaemon">To cancel someone else's software changes, you need to authenticate.</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>auth_admin</allow_active>
    </defaults>
  </action>

  <action id="org.debian.apt.set-proxy">
    <description gettext-domain="aptdaemon">Set a proxy for software downloads</description>
    <message gettext-domain="aptdaemon">To use a proxy server for downloading software, you need to authenticate.</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>auth_admin</allow_active>
    </defaults>
  </action>

</policyconfig>

Um es zu bearbeiten, wechseln Sie zum Root-Benutzer im Terminal mit:

sudo -i

Führen Sie dann den folgenden Befehl aus:

gedit /usr/share/polkit-1/actions/org.debian.apt.policy

und schließen Sie diese Root-Sitzung mit CTRLDoder durch Eingabe exit.

Radu Rădeanu
quelle