/srv/irclogs.ubuntu.com/2020/01/11/#ubuntu+1.txt

ScaredySquirrelI want to know how you'd tell PolicyKit not to ask users in the sudo group for any passwors18:09
ScaredySquirrelpasswords when I do something that requires root priviledges18:09
ScaredySquirreltails@tails-Inspiron-3582:/mnt/myusb$ id -Gn|grep -oe '\<sudo\>'18:10
ScaredySquirrelsudo18:10
ScaredySquirreltails@tails-Inspiron-3582:/mnt/myusb$ cat /etc/os-release 18:10
ScaredySquirrelNAME="Ubuntu"18:10
ScaredySquirrelVERSION="20.04 LTS (Focal Fossa)"18:10
ScaredySquirreland here's my policykit : http://dpaste.com/2CK3Z6M18:11
ScaredySquirrelwould anything be wrong with my policykit file? what else do I need to change?18:17
TJ-ScaredySquirrel: I wonder if a rule would help? see https://wiki.archlinux.org/index.php/Polkit#Authorization_rules18:34
ScaredySquirrelTJ-: I don't know how to use globs18:37
ScaredySquirrelif(action.id =~ "org.debian.apt.*" && subject.isInGroup("sudo")) { return polkit.Result.YES; }18:39
TJ-I don't think the glob * is required18:43
ScaredySquirrelbut why?18:45
ScaredySquirrelthere's this nopasswd global rules thingy but then firefox would laugh and auto authenticate18:45
ScaredySquirrelit doesn't use polkit so no...not the case18:46
ScaredySquirrelthere would have to be a huge hole in there to make it launch a little program that uses polkit and dbus and then that would happen18:46
ScaredySquirrelbecause it doesn't care in this case18:46
ScaredySquirrelabout what little dbus handle the app uses18:46
ScaredySquirrelso that nopasswd global rules is telling it to ignore the action18:49
TJ-If it is the polkit user agent pormpting for the password then you should be able to use a polkit rule to handle it18:49
ScaredySquirrelwait does polkit at least put a dialog up with Authenticate and click there and it just goes ahead and elevates to root?18:50
ScaredySquirrelat least if you put nopasswd global rule in?18:51
ScaredySquirreli mean in that case18:52
TJ-for a global rule I'd expect no prompt18:52
TJ-I'm on about the current situation before making any changes18:52
TJ-As rules are written in Javascript you'd need to create a RegExp object and then call .test(...) on it18:53
ScaredySquirrelabout the Current situation it says Authenticate I click there and it asks for a password when I have no password set18:53
TJ-asks for the password of a user where that user has no password?18:54
ScaredySquirrelyes18:54
ScaredySquirrelthat user is is sudo <command> with NOPASSWD in sudoers for his sudo group so he needs no password for that18:55
TJ-well that makes sense, it's not polkit's fault the invoking user has no password18:55
ScaredySquirrelhowever policykit has its no password policy18:56
ScaredySquirrelwhere only policykit asks for and requires a password when it has no password18:56
TJ-ScaredySquirrel: but polkit doesn't use sudo/sudoers, it is entirely separate. All it does do is observe which group(s) a user should be in18:56
TJ-It used to be the adm group18:57
ScaredySquirrelmhm its seperate so what to do to apply the same nopasswd policy to polkit for users in the sudo group?18:57
ScaredySquirreland i take in mind its not sudo so its not the same system18:58
ScaredySquirrelpolkit will not use the same policy as sudo18:58
ScaredySquirreli just want similar18:58
TJ-As I understood it, you only want no-password to apply to a sub-set of calls, not for everthing a user might try to do18:59
ScaredySquirrelunless policykit always forces you to use the Authenticate dialog18:59
ScaredySquirrelif an app can just take over and press Authenticate for you that's not what I want19:00
TJ-the link I provided earlier gives good examples of various scenarios, https://wiki.archlinux.org/index.php/Polkit#For_specific_actions19:00

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!