Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Security and Privacy
FedoraForum Search

Forgot Password? Join Us!

Security and Privacy Sadly, malware, spyware, hackers and privacy threats abound in today's world. Let's be paranoid and secure our penguins, and slam the doors on privacy exploits.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 18th November 2009, 01:52 AM
Luther_Blisset Offline
Registered User
 
Join Date: Nov 2009
Posts: 2
linuxfedorafirefox
Fun with Polkit - Textmode! Help!

So F12 has no Polkit UI, and We, I, You need to rely on editing text files.

I tried reading the man pages for polkit, but they are confusing the hell out of me.

basically, what I want to do is: have packagekit ask users for the root password every time something gets installed.

not just when untrustworthy things are to be or things get removed.

how/where do I modify the files?
Reply With Quote
  #2  
Old 18th November 2009, 06:17 AM
Dies Offline
Registered User
 
Join Date: Oct 2006
Posts: 4,752
linuxfedorafirefox
Umm, isn't that already the default behavior to ask every time?

Pretty sure it is, I had to switch mine to "don't ask, just do it" mode manually.
Reply With Quote
  #3  
Old 18th November 2009, 11:41 AM
Milena's Avatar
Milena Offline
Registered User
 
Join Date: Mar 2009
Location: Europe
Posts: 304
linuxfedorafirefox
Quote:
Originally Posted by Luther_Blisset View Post
So F12 has no Polkit UI
Code:
yum install policycoreutils-gui
its not installed by default anymore.
Reply With Quote
  #4  
Old 18th November 2009, 01:43 PM
Luther_Blisset Offline
Registered User
 
Join Date: Nov 2009
Posts: 2
linuxfedorafirefox
Quote:
Originally Posted by Milena View Post
Code:
yum install policycoreutils-gui
its not installed by default anymore.
no, that is not the right one.

policycoreutils-gui is for SELinux.

I am talking about polkit-gnome-authorizations or something to that extent, that manages, for example, authorizations to install trusted files. asking for passwords to install programs, asking for permission to uninstall files, mounting disks, and all that.

which does not exist in f12.

Quote:
Originally Posted by Dies View Post
Umm, isn't that already the default behavior to ask every time?

Pretty sure it is, I had to switch mine to "don't ask, just do it" mode manually.
once you set it, how do you revoke it again?

Last edited by Luther_Blisset; 18th November 2009 at 03:03 PM.
Reply With Quote
  #5  
Old 18th November 2009, 03:06 PM
Milena's Avatar
Milena Offline
Registered User
 
Join Date: Mar 2009
Location: Europe
Posts: 304
linuxfedorafirefox
sorry i mixed up selinux gui and policytoolkit because the selinux one was not installed either
Reply With Quote
  #6  
Old 18th November 2009, 04:13 PM
Dies Offline
Registered User
 
Join Date: Oct 2006
Posts: 4,752
linuxfedorafirefox
Quote:
Originally Posted by Luther_Blisset View Post
once you set it, how do you revoke it again?
As far as I know, in F12 you need to include your own policy in /var/lib/polkit-1. So the answer to your question is to either delete or modify the policy you installed.

If there are other ways to do it I'm sorry I'm not familiar with them.

On my installation the default behavior was to ask every single time with no option to keep authorization, which is what you said you want so... yeah... not sure why you need to change anything.
Reply With Quote
  #7  
Old 19th November 2009, 12:20 AM
kyryder
Guest
 
Posts: n/a
linuxfedorafirefox
polkit and package kit and changing settings

I ran across this on planet fedora, hope it helps

polkit and package kit and changing settings

In f12 the default policy for polkit for package kit is to allow users at the
desktop to install signed pkgs from repositories enabled on the system.

Some folks are unhappy about this so I investigated a bit. Ray Strode looked
through the polkit code to figure out the answers.

The short answer is to run (as root)

pklalockdown –lockdown org.freedesktop.packagekit.package-install

to remove this lockdown run (as root):

pklalockdown –remove-lockdown org.freedesktop.packagekit.package-install



Update: According davidz in the comments below the above command is going away. So if you want to keep users from installing pkgs you need to follow the longer instructions below.


the long answer explains a bit about polkit.

To get a list of all actions that policykit knows about you run:

pkaction

to get information about the system defaults for any action you run:

pkaction –action-id actionname –verbose

this only tells you what the system defaults are. It doesn’t tell you what
the current runtime policy is going to do.

examples:
pkaction –action-id org.freedesktop.packagekit.package-install –verbose

org.freedesktop.packagekit.package-install:
description: Install signed package
message: Authentication is required to install a signed package
vendor: The PackageKit Project
vendor_url: http://www.packagekit.org/
icon: package-x-generic
implicit any: no
implicit inactive: no
implicit active: yes

Now, if I want to change the value of this to something more specific you need
to edit a file:
/var/lib/polkit-1/localauthority/50-local.d/10-my-pkgkit-policy.pkla

in this file you would put:

[Only Let Admins Install Packages]
Identity=unix-user:*
Action=org.freedesktop.packagekit.package-install
ResultAny=auth_admin
ResultInactive=auth_admin
ResultActive=auth_admin

save it and that’s it.

The line Identity let’s you specify users or groups that the policy impacts.
The items are ; separated and each one must start with unix-user or unix-group
and have a user, group or wildcard following it.

Now, if you want to test to make sure this works you can, of course, run the
program in question. OR you can use pkcheck.

you use pkcheck like this:
pkcheck –action-id org.freedesktop.packagekit.package-install \
–process $process_id_of_the_process_making_the_request \
-u $the_username_you_are_testing

the process id I used was of a shell of the user or was the gnome-session process.

it should pop up an auth dialog if you did everything correctly.

For more complete docs look at:
man pklocalauthority

and

man polkit

hope this helps.
Reply With Quote
  #8  
Old 19th November 2009, 01:05 AM
Dies Offline
Registered User
 
Join Date: Oct 2006
Posts: 4,752
linuxfedorafirefox
Quote:
Originally Posted by kyryder View Post
In f12 the default policy for polkit for package kit is to allow users at the
desktop to install signed pkgs from repositories enabled on the system.
Huh, wasn't like that when I installed this system, but then again it's not an actual release so... I'll install the actual release later and check it out.

Thanks for finding and sharing the info though.
Reply With Quote
  #9  
Old 19th November 2009, 01:23 AM
kyryder
Guest
 
Posts: n/a
linuxfedorafirefox
Quote:
Originally Posted by Dies View Post
Thanks for finding and sharing the info though.
Even a blind squirrel gets a nut every once in a while.
Reply With Quote
  #10  
Old 11th June 2012, 11:06 PM
kevlar Offline
Registered User
 
Join Date: Jun 2012
Location: England
Posts: 1
linuxopera
Exclamation Re: Fun with Polkit - Textmode! Help!

So Polkit is a suid root daemon that grants permissions.

It has pkaction which gives undescriptive names of what polkit can do but according to this thread that doesn't even inform you of what is allowed to Run. The documentation doesn't help here at all either. etc. certainly does not belong in the scarce permissions descriptions.

You can edit config files to turn off or control these permissions. However on f17 there are no config files so you would expect no permissions enabled. Wrong.

Good security requires transparency. Anyone else see the fundamental flaw, never mind configuration idiocy here. Are we expected to track the source and work out each permission ourselves!!!


Systemd takes longer to use on the commandline and I prefer shell scripts in one location but atleast it brings some benefits that can't be done with other better tools and atleast you don't have to write an essay to turn some things off.

p.s. almost no proper admin likes XML. There is NOTHING wrong with tried and tested traditional UNIX textual config files except perhaps in a realtime system requiring binary, which is very rare!!!

p.p.s. Getting gnome3 to not raise a window on click seems impossible, getting it to not raise a window on focus is do-able but another config system mess.

And someone tried to tell me I should use Fedora, walking off in a knowing fashion, what a cheek. Fedora has some merits but fedup is certainly more appropriate in other ways.

Reply With Quote
  #11  
Old 12th June 2012, 12:26 AM
smr54 Offline
Registered User
 
Join Date: Jan 2010
Posts: 4,976
linuxchrome
Re: Fun with Polkit - Textmode! Help!

Note that this thread is close to three years old.

There is a rants section of the forum--it's original purpose was to allow people to vent, but unfortunately, when they do, the fanboys come in and tell them how stupid they are.

Also note that developers don't often see these threads--while a few sometimes look through the forum, generally, the best way to reach them is by filing a bug report. However, I think you (us) have to accept that for better or worse, Fedora's target audience seems to be, more and more, the desktop user, and with each release, it becomes harder and harder to deal with it as a sysadmin. I suppose Debian admins probably feel the same way about each new Ubuntu release.

Edit: The above was written late last night--in morning's light, I am sure that part of my irritation is simply that of anyone forced to learn something new when they're lazy. Some of these things will, if not now, later, be improvements, and some, no doubt, will drastically contradict the old adage that Unix doesn't keep you from doing stupid things because that would keep you from doing clever things. One forum member has compared some decisions to the being similar to welding on training wheels.

Anyway, main points to be gleaned from my ramblings are that this thread is quite old, there is a rants forum, but usually the ranter is criticized, and, that at least in my admittedly old person's opinion, Fedora is, more and more, aimed primarily at the desktop user, and, judging from its popularity, seems to be what the majority want.

Last edited by smr54; 12th June 2012 at 01:34 PM.
Reply With Quote
Reply

Tags
packagekit, policykit, polkit

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
polkit crashes when installing a network printer daviddoria Using Fedora 0 18th September 2009 01:40 AM
Issues with polkit-gnome-authorization (mounting errors)) m@! Using Fedora 7 2nd August 2009 04:51 AM
Polkit-Qt??? robghealey Alpha, Beta & Snapshots Discussions (Fedora 11 Only) 1 25th April 2009 06:57 AM
F9, NTFS-3G, and polkit-gnome-authorization LinuxTom Using Fedora 1 27th May 2008 03:03 PM
Can FC7 LiveCD be used as an installation of Textmode lotoren Installation and Live Media 8 1st October 2007 04:24 PM


Current GMT-time: 10:24 (Sunday, 19-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat