# Pkexec demande le mot de passe root alors que le compte root est verrouillé

**URL:** <https://www.debian-fr.org/t/pkexec-demande-le-mot-de-passe-root-alors-que-le-compte-root-est-verrouille/75920>\
**Category:** Support Debian\
**Created:** [Février 15, 2018, 10:03 UTC](https://www.debian-fr.org/t/pkexec-demande-le-mot-de-passe-root-alors-que-le-compte-root-est-verrouille/75920 "2018-02-15T10:03:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcsm33](https://www.debian-fr.org/user_avatar/www.debian-fr.org/jcsm33/32/3832_2.png) [@jcsm33](https://www.debian-fr.org/u/jcsm33)\
**Post date:** [Février 15, 2018, 10:03 UTC](https://www.debian-fr.org/t/pkexec-demande-le-mot-de-passe-root-alors-que-le-compte-root-est-verrouille/75920/1 "2018-02-15T10:03:52Z")

</div>

Salut,

C’est debian stretch avec gnome installé de zéro depuis quelques heures seulement.

Aucun mot de passe root défini à l’installation donc sudo est en place avec l’unique compte utilisateur créé.

Malgré cela, pkexec demande le mot de passe root.

Comment faire pour qu’il soit configuré correctement afin de demander le mot de passe utilisateur ?

```
$ groups
user cdrom floppy sudo audio dip video plugdev netdev

$ pkexec echo "test"
==== AUTHENTICATING FOR org.freedesktop.policykit.exec ===
Authentication is needed to run `/bin/echo' as the super user
Authenticating as: root
Password: 

```

Est-ce que le contenu de ce fichier est correct ?

```
$ 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 

```

Sinon, quel programme génère ce même fichier ?

EDIT

Il n’y a pas d’autres fichiers localauthority… peut-être que le problème vient d’un fichier manquant ?

```
# ls -R /etc/polkit-1/localauthority*
/etc/polkit-1/localauthority:
10-vendor.d 20-org.d 30-site.d 50-local.d 90-mandatory.d

/etc/polkit-1/localauthority/10-vendor.d:

/etc/polkit-1/localauthority/20-org.d:

/etc/polkit-1/localauthority/30-site.d:

/etc/polkit-1/localauthority/50-local.d:

/etc/polkit-1/localauthority/90-mandatory.d:

/etc/polkit-1/localauthority.conf.d:
50-localauthority.conf

```

EDIT 2

Ah mais il y en a dans /var/lib

```
$ sudo ls -R /var/lib/polkit-1/localauthority/
/var/lib/polkit-1/localauthority/:
10-vendor.d 20-org.d 30-site.d 50-local.d 90-mandatory.d

/var/lib/polkit-1/localauthority/10-vendor.d:
geoclue-2.0.pkla gnome-control-center.pkla org.freedesktop.NetworkManager.pkla org.freedesktop.packagekit.pkla

/var/lib/polkit-1/localauthority/20-org.d:

/var/lib/polkit-1/localauthority/30-site.d:

/var/lib/polkit-1/localauthority/50-local.d:

/var/lib/polkit-1/localauthority/90-mandatory.d:
```

---

<div class="post-metadata">

**Author:** ![jcsm33](https://www.debian-fr.org/user_avatar/www.debian-fr.org/jcsm33/32/3832_2.png) [@jcsm33](https://www.debian-fr.org/u/jcsm33)\
**Post date:** [Février 15, 2018, 10:47 UTC](https://www.debian-fr.org/t/pkexec-demande-le-mot-de-passe-root-alors-que-le-compte-root-est-verrouille/75920/2 "2018-02-15T10:47:07Z")

</div>

Effectivement, il manque un fichier /etc/polkit-1/localauthority.conf.d/51-debian-sudo.conf contenant ceci

```
[Configuration]
AdminIdentities=unix-group:sudo

```

Trouvé grâce à la source 🙂

[https://sources.debian.org/src/policykit-1/0.105-18/debian/rules/?hl=41#L41](https://sources.debian.org/src/policykit-1/0.105-18/debian/rules/?hl=41#L41)

Aucune idée par contre de la raison de son absence…

---

<div class="post-metadata">

**Author:** ![jcsm33](https://www.debian-fr.org/user_avatar/www.debian-fr.org/jcsm33/32/3832_2.png) [@jcsm33](https://www.debian-fr.org/u/jcsm33)\
**Post date:** [Septembre 25, 2020, 6:26 UTC](https://www.debian-fr.org/t/pkexec-demande-le-mot-de-passe-root-alors-que-le-compte-root-est-verrouille/75920/3 "2020-09-25T18:26:44Z")

</div>

mise à jour du lien cassé

[https://sources.debian.org/src/policykit-1/0.105-18+deb9u1/debian/rules/?hl=41#L41](https://sources.debian.org/src/policykit-1/0.105-18+deb9u1/debian/rules/?hl=41#L41)
