認証遅延

認証遅延

私は単純なウィンドウマネージャ(Blackbox)を使ってDebian Wheezyを実行します。私が正確に覚えている場合は、UbuntuでSynapticやUpdate Managerなどの一部のアプリケーションは、必要な場合にのみsudoパスワードを要求します。一般ユーザーとしてUpdate Managerを起動し、システムが更新されたときにsudoパスワードのみを提供できるようにシステムを構成するにはどうすればよいですか?

~/.xinitrcウィンドウマネージャは次から起動します。

exec ck-launch-session dbus-launch blackbox

次の内容を含むファイルを追加してXを再起動しましたが、起動時にまだrootパスワードの入力を求め/var/lib/polkit-1/localauthority/50-local.d/test.pklaられませんでした。update-manager

$ sudo cat /var/lib/polkit-1/localauthority/50-local.d/test.pkla
[test]
Identity=unix-group:sudo
Action=org.debian.apt.update-cache
ResultActive=yes

Graemeの要求に応じて、ディレクトリの内容は/usr/share/polkit-1/actions/次のとおりです。

com.hp.hplip.policy
com.ubuntu.pkexec.synaptic.policy
com.ubuntu.softwareproperties.policy
org.debian.apt.policy
org.freedesktop.color.policy
org.freedesktop.consolekit.policy
org.freedesktop.policykit.policy
org.freedesktop.udisks.policy
org.opensuse.cupspkhelper.mechanism.policy

ディレクトリの内容は次のとおりです/etc/polkit-1/localauthority.conf.d

$ ls /etc/polkit-1/localauthority.conf.d/
50-localauthority.conf  51-debian-sudo.conf

$ cat /etc/polkit-1/localauthority.conf.d/50-localauthority.conf 
# Configuration file for the PolicyKit Local Authority.
#
# DO NOT EDIT THIS FILE, it will be overwritten on update.
#
# See the pklocalauthority(8) man page for more information
# about configuring the Local Authority.
#

[Configuration]
AdminIdentities=unix-user:0

$ cat /etc/polkit-1/localauthority.conf.d/51-debian-sudo.conf 
[Configuration]
AdminIdentities=unix-group:sudo

ファイルの内容は次のとおりですsudoers

$ sudo cat /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults        env_reset
Defaults        mail_badpass
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d

ベストアンサー1

お客様は、PolKit 管理者ユーザーとしてリストされない場合があります。たとえば、Ubuntuでは次のようになります。

$ cat /etc/polkit-1/localauthority.conf.d/51-ubuntu-admin.conf
[Configuration]
AdminIdentities=unix-group:sudo;unix-group:admin

インストール中に作成されたユーザーはのメンバーであるため、sudo自動的に管理者になります。

自分を管理者として追加するには.conf(ユーザー名など)を含むファイルを作成します。/etc/polkit-1/localauthority.conf.d/99-local-admin.confaugust

[Configuration]
AdminIdentities=unix-user:august

おすすめ記事