Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #256805 > unrolled thread

How: Require root password instead of user password for GUI programs

Started by"B.M." <b-misc@gmx.ch>
First post2023-04-06 14:40 +0200
Last post2023-04-08 07:40 +0200
Articles 7 — 5 participants

Back to article view | Back to linux.debian.user


Contents

  How: Require root password instead of user password for GUI programs "B.M." <b-misc@gmx.ch> - 2023-04-06 14:40 +0200
    Re: How: Require root password instead of user password for GUI programs Jeffrey Walton <noloader@gmail.com> - 2023-04-06 17:10 +0200
      Re: How: Require root password instead of user password for GUI  programs Joe <joe@jretrading.com> - 2023-04-06 17:30 +0200
      Re: How: Require root password instead of user password for GUI  programs "B.M." <b-misc@gmx.ch> - 2023-04-07 18:40 +0200
        Re: How: Require root password instead of user password for GUI  programs <tomas@tuxteam.de> - 2023-04-07 21:20 +0200
          Re: How: Require root password instead of user password for GUI  programs Brian <ad44@cityscape.co.uk> - 2023-04-08 00:40 +0200
            Re: How: Require root password instead of user password for GUI  programs <tomas@tuxteam.de> - 2023-04-08 07:40 +0200

#256805 — How: Require root password instead of user password for GUI programs

From"B.M." <b-misc@gmx.ch>
Date2023-04-06 14:40 +0200
SubjectHow: Require root password instead of user password for GUI programs
Message-ID<Ghx4d-atR-5@gated-at.bofh.it>
Hi,

I configured my system such that some users are in group sudo, but they are
asked for the root password instead of just their user password by creating a
file within /etc/sudoers.d/ with the line:

 Defaults rootpw

This is working just fine, but for graphical applications it doesn't work: e.g.
to start synaptic I get a password prompt requiring my user password, not the
root password.

How can I configure my system such that entering the root password is also
required in these cases?

(Maybe there is something with polkit, but I couldn't figure out myself...)

Thank you.

Have a nice day,
Bernd

[toc] | [next] | [standalone]


#256807

FromJeffrey Walton <noloader@gmail.com>
Date2023-04-06 17:10 +0200
Message-ID<Ghzpn-c5d-3@gated-at.bofh.it>
In reply to#256805
On Thu, Apr 6, 2023 at 8:36 AM B.M. <b-misc@gmx.ch> wrote:
>
> I configured my system such that some users are in group sudo, but they are
> asked for the root password instead of just their user password by creating a
> file within /etc/sudoers.d/ with the line:
>
>  Defaults rootpw
>
> This is working just fine, but for graphical applications it doesn't work: e.g.
> to start synaptic I get a password prompt requiring my user password, not the
> root password.
>
> How can I configure my system such that entering the root password is also
> required in these cases?
>
> (Maybe there is something with polkit, but I couldn't figure out myself...)

May be helpful:
https://askubuntu.com/questions/1199006/how-to-let-polkit-request-root-password-instead-users-password

And possibly https://askubuntu.com/questions/1246661/defaults-rootpw-for-the-gui-password-prompt

Jeff

[toc] | [prev] | [next] | [standalone]


#256808 — Re: How: Require root password instead of user password for GUI programs

FromJoe <joe@jretrading.com>
Date2023-04-06 17:30 +0200
SubjectRe: How: Require root password instead of user password for GUI programs
Message-ID<GhzIJ-cbf-5@gated-at.bofh.it>
In reply to#256807
On Thu, 6 Apr 2023 11:04:13 -0400
Jeffrey Walton <noloader@gmail.com> wrote:

> On Thu, Apr 6, 2023 at 8:36 AM B.M. <b-misc@gmx.ch> wrote:
> >
> > I configured my system such that some users are in group sudo, but
> > they are asked for the root password instead of just their user
> > password by creating a file within /etc/sudoers.d/ with the line:
> >
> >  Defaults rootpw
> >
> > This is working just fine, but for graphical applications it
> > doesn't work: e.g. to start synaptic I get a password prompt
> > requiring my user password, not the root password.
> >
> > How can I configure my system such that entering the root password
> > is also required in these cases?
> >
> > (Maybe there is something with polkit, but I couldn't figure out
> > myself...)  
> 
> May be helpful:
> https://askubuntu.com/questions/1199006/how-to-let-polkit-request-root-password-instead-users-password
> 
> And possibly
> https://askubuntu.com/questions/1246661/defaults-rootpw-for-the-gui-password-prompt
> 
> Jeff
> 

On Debian, it is my experience that a default installation of Synaptic
always requires the root password. It is invoked by synaptic-pkexec.

-- 
Joe

[toc] | [prev] | [next] | [standalone]


#256839 — Re: How: Require root password instead of user password for GUI programs

From"B.M." <b-misc@gmx.ch>
Date2023-04-07 18:40 +0200
SubjectRe: How: Require root password instead of user password for GUI programs
Message-ID<GhXi1-r2k-1@gated-at.bofh.it>
In reply to#256807
On Thu, 2023-04-06 at 11:04 -0400, Jeffrey Walton wrote:
> On Thu, Apr 6, 2023 at 8:36 AM B.M. <b-misc@gmx.ch> wrote:
> > 
> > I configured my system such that some users are in group sudo, but
> > they are
> > asked for the root password instead of just their user password by
> > creating a
> > file within /etc/sudoers.d/ with the line:
> > 
> >  Defaults rootpw
> > 
> > This is working just fine, but for graphical applications it
> > doesn't work: e.g.
> > to start synaptic I get a password prompt requiring my user
> > password, not the
> > root password.
> > 
> > How can I configure my system such that entering the root password
> > is also
> > required in these cases?
> > 
> > (Maybe there is something with polkit, but I couldn't figure out
> > myself...)
> 
> May be helpful:
> https://askubuntu.com/questions/1199006/how-to-let-polkit-request-root-password-instead-users-password
> 
> And possibly
> https://askubuntu.com/questions/1246661/defaults-rootpw-for-the-gui-password-prompt
> 
> Jeff

Thank you for your ideas.

In fact it seems that these solutions are a bit outdated - I found out
that the following is needed, as documented in the Arch Wiki.

PolicyKit got replaced by polkit (at least in current Debian Testing),
and the "old" solution with setting AdminIdentities doesn't work
anymore. Instead one has to add a file /etc/polkit-1/rules.d/50-
default.rules as follows:

polkit.addAdminRule(function(action, subject) {
    return ["unix-user:0"];
});

in order to require root credentials for admin tasks (if sudo is
installed).

I hope someone finds this useful.

Best,
Bernd

[toc] | [prev] | [next] | [standalone]


#256841 — Re: How: Require root password instead of user password for GUI programs

From<tomas@tuxteam.de>
Date2023-04-07 21:20 +0200
SubjectRe: How: Require root password instead of user password for GUI programs
Message-ID<GhZMR-sHU-7@gated-at.bofh.it>
In reply to#256839

[Multipart message — attachments visible in raw view] — view raw

On Fri, Apr 07, 2023 at 06:22:48PM +0200, B.M. wrote:

[...]

> PolicyKit got replaced by polkit (at least in current Debian Testing),
> and the "old" solution with setting AdminIdentities doesn't work
> anymore. Instead one has to add a file /etc/polkit-1/rules.d/50-
> default.rules as follows:
> 
> polkit.addAdminRule(function(action, subject) {
>     return ["unix-user:0"];
> });

Gah.

> in order to require root credentials for admin tasks (if sudo is
> installed).
> 
> I hope someone finds this useful.

You folks keeping up with desktop environments are
real heroes:-)

Cheers
-- 
t

[toc] | [prev] | [next] | [standalone]


#256845 — Re: How: Require root password instead of user password for GUI programs

FromBrian <ad44@cityscape.co.uk>
Date2023-04-08 00:40 +0200
SubjectRe: How: Require root password instead of user password for GUI programs
Message-ID<Gi2Uq-uxT-3@gated-at.bofh.it>
In reply to#256841
On Fri 07 Apr 2023 at 21:09:59 +0200, tomas@tuxteam.de wrote:

> On Fri, Apr 07, 2023 at 06:22:48PM +0200, B.M. wrote:
> 
> [...]
> 
> > PolicyKit got replaced by polkit (at least in current Debian Testing),
> > and the "old" solution with setting AdminIdentities doesn't work
> > anymore. Instead one has to add a file /etc/polkit-1/rules.d/50-
> > default.rules as follows:
> > 
> > polkit.addAdminRule(function(action, subject) {
> >     return ["unix-user:0"];
> > });
> 
> Gah.
> 
> > in order to require root credentials for admin tasks (if sudo is
> > installed).
> > 
> > I hope someone finds this useful.
> 
> You folks keeping up with desktop environments are
> real heroes:-)

It's a dirty job, but someone has to do it :).

-- 
Brian.

[toc] | [prev] | [next] | [standalone]


#256853 — Re: How: Require root password instead of user password for GUI programs

From<tomas@tuxteam.de>
Date2023-04-08 07:40 +0200
SubjectRe: How: Require root password instead of user password for GUI programs
Message-ID<Gi9sS-yPt-3@gated-at.bofh.it>
In reply to#256845

[Multipart message — attachments visible in raw view] — view raw

On Fri, Apr 07, 2023 at 11:38:28PM +0100, Brian wrote:
> On Fri 07 Apr 2023 at 21:09:59 +0200, tomas@tuxteam.de wrote:

[...]

> > You folks keeping up with desktop environments are
> > real heroes:-)
> 
> It's a dirty job, but someone has to do it :).

I gave up and ended at Fvwm in a big round circle.

I'm too old for this shit.

Cheers
-- 
t

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web