You are not logged in.

#1 2016-01-05 04:33:35

zerophase
Member
Registered: 2015-09-03
Posts: 228

Yaourt asks for root and user password, instead of just root.

I've been writing some bash scripts for reinstalling Arch with the same configuration I currently have. The only issue I've been having while testing in VirtualBox is Yaourt asks for both root and user passwords one after the other. I can't remember or find the solution I used to make yaourt only require root's password.

I checked my current Arch install, and yaourtrc has:

#SUDONOVERIF=0

I don't think that's what I need to change.

I do have custom rules in /etc/polkit-1/rules.d/49-rootpw_global.rules

/* Always authenticate Admins by prompting for the root
* password, similar to the rootpw option in sudo
*/
polkit.addAdminRule(function(action, subject) {
    return ["unix-user:root"];
});

Though I don't think that would effect yaourt. Does anyone know, how to stop yaourt from asking for passwords from multiple users?

Offline

#2 2016-01-05 04:43:54

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: Yaourt asks for root and user password, instead of just root.

Moving to AUR issues, Discussion and PKGBUILD requests


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2016-01-05 09:48:14

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: Yaourt asks for root and user password, instead of just root.

Yaourt only asks for the sudo password if the sudo configuration allows the user to run the necessary commands (in our case pacman).

So the simplest solution would be not to configure your user for sudo until you've finished installing packages with yaourt¹.

___
¹ and the recommended solution would be to use makepkg and pacman directly, to avoid this limitation


pkgshackscfgblag

Offline

#4 2016-01-05 15:38:07

zerophase
Member
Registered: 2015-09-03
Posts: 228

Re: Yaourt asks for root and user password, instead of just root.

ayekat wrote:

Yaourt only asks for the sudo password if the sudo configuration allows the user to run the necessary commands (in our case pacman).

So the simplest solution would be not to configure your user for sudo until you've finished installing packages with yaourt¹.

___
¹ and the recommended solution would be to use makepkg and pacman directly, to avoid this limitation

Using makepkg and pacman directly would make the most sense for a script. I'll probably eventually go that direction. The only thing is I'm still left with the issue of when installing new packages and upgrading from the aur (after the initial setup of the system) that yaourt requires inputting both passwords. Wish I remembered what I did 6 months ago.

Offline

#5 2016-01-05 15:43:28

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: Yaourt asks for root and user password, instead of just root.

zerophase wrote:

after the initial setup of the system

After the initial setup of the system, installations of AUR packages are no longer scripted but interactive, aren't they? So I don't quite see the problem with yaourt asking the user password instead of the root password.


pkgshackscfgblag

Offline

#6 2016-01-05 15:43:49

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,463

Re: Yaourt asks for root and user password, instead of just root.

Why did you rule out SUDONOVERIF?

Offline

#7 2016-01-05 16:27:41

zerophase
Member
Registered: 2015-09-03
Posts: 228

Re: Yaourt asks for root and user password, instead of just root.

Scimmia wrote:

Why did you rule out SUDONOVERIF?

If I put SUDONOVERIF in the users yaourtrc, it'll still ask for the root password, but not the users right? I'm mainly trying to figure out why on my current physical install of Arch the system only asks for the root password, even though SUDONOVERIF is set to false globally and the user doesn't have a .yaourtrc. I'm mostly curious if policykit's settings might be the reason.

ayekat wrote:

After the initial setup of the system, installations of AUR packages are no longer scripted but interactive, aren't they? So I don't quite see the problem with yaourt asking the user password instead of the root password.

Yeah, they'll be interactive.  The issue I'm having is yaourt asks for the root password, and then the users password on package installs. I'll just set the users SUDONOVERIF to true.

Last edited by zerophase (2016-01-05 16:32:35)

Offline

#8 2016-01-05 16:38:09

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: Yaourt asks for root and user password, instead of just root.

zerophase wrote:

The issue I'm having is yaourt asks for the root password, and the users password on package installs.

That is actually weird - how do you invoke yaourt?

Does the user have the right to use sudo? If so, yaourt will run pacman with sudo. Otherwise, yaourt will run pacman with su.
However, it should not ask for both the user's and the root password.


pkgshackscfgblag

Offline

#9 2016-01-05 17:02:33

zerophase
Member
Registered: 2015-09-03
Posts: 228

Re: Yaourt asks for root and user password, instead of just root.

ayekat wrote:
zerophase wrote:

The issue I'm having is yaourt asks for the root password, and the users password on package installs.

That is actually weird - how do you invoke yaourt?

Does the user have the right to use sudo? If so, yaourt will run pacman with sudo. Otherwise, yaourt will run pacman with su.
However, it should not ask for both the user's and the root password.

My sudo file is setup like so:

%wheel ALL=(ALL) ALL
Defaults rootpw
zerophase ALL=(ALL) NOPASSWD: /usr/bin/psd-overlay-helper

I just invoke yaourt from the users account. That asking for both passwords happened when I initially installed arch on a physical system, but went away over time. (Think the edit I made to policykit did it, but I don't think it should have)

Offline

Board footer

Powered by FluxBB