You are not logged in.
I would like the root passowrd to be required whenever a user tries to install apps.
Currently when the user tries installing apps either through
sudo pacman -S <package>Or by using the pacman GUI, only the user password is required.
I tried uncommenting this line:
Defaults targetpwIn the file:
/etc/sudoersThis worked when using the sudo command. But when using the GUI, the user is asked for his own password, not the root password. Any ideas please?
Last edited by light9876 (2020-04-27 10:34:30)
Offline
If you want to use root password you need to be logged in as root. If you use other account that root then that account should not be having sudo permissions
Offline
Offline
I installed Arch from the installer here https://www.archlinux.org/download/
I'm sorry I meant pamac-manager; not pacman.
Then how can I restrict user from installing applications using pamac-manager? Is uninstalling it the only option?
EDIT:
Running the command
pacman -S vlcFrom command line does not work, it does not even ask for the user's password. But installing vlc from pamac-manager, asks for the user's password.
Last edited by light9876 (2020-04-21 11:39:23)
Offline
Pamac likely has defined polkit rules, or rather utilizes the default polkit rule to allow all users of the wheel group to access privileged actions: https://wiki.archlinux.org/index.php/Polkit that entire page should be read if interested in the topic but specifically pay attention to: https://wiki.archlinux.org/index.php/Po … identities as it explains how to change this exact behaviour you are asking about.
Last edited by V1del (2020-04-21 11:41:10)
Offline
Thank you so much V1del, it worked.
I only added the file:
/etc/polkit-1/rules.d/49-rootpw_global.rulesContaining:
/* 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"];
});Last edited by light9876 (2020-04-21 12:55:36)
Offline
Please remember to mark your thread [SOLVED] (edit the title of your first post).
Offline
I'm a bit confused by - and concerned about - the goal.
You apparently have users that are in the wheel group (or otherwise allowed to use sudo) but you don't want them to be able to install packages. Limiting pacman and pamac to only accepting the root password will not acheive this goal. If users are in the wheel group and/or can use sudo, they can simply change the root password then install whatever they want.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
They can also just launch a su shell ;-)
However, he already contained sudo by enabling targetpw and "pkexec bash" gets me https://xkcd.com/838/
Offline
It makes me sad that Randall runs 'sudo su' instead of 'sudo -i'. ![]()
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
According to https://www.explainxkcd.com/wiki/index.php/Rob that's Black Hats roommate, so he's probably deliberately side-stepping some prank…
Offline
oops never mind LOL
Last edited by SurlyCycler (2020-04-22 17:20:12)
Offline
It makes me sad that Randall runs 'sudo su' instead of 'sudo -i'.
Those two commands do have different behavior though, for example the results of `env`, sudo -i performs a login as root vs. just spawning a shell with a different EUID (sudo bash would be more comparable, and sudo -i is closer to sudo su --login which would incidentally wipe $SUDO_*).
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline