2

There are several things that you must have superuser privileges to do from a terminal that can be done from a normal user account via the gui. e.g.

  • Poweroff/reboot

  • mount/unmount media

I understand why this is useful, but how exactly does this work without sufficient permission?

edit:

A comment suggest that I look at polkit and it seems that pkexec can be used to elevate privileges for certain commands. Is this how the things are executed through the gui?

1

PC-BSD

Approaches include pc-su. You can read a little about this in the Handbook for 10.2, and in the forums:

Both "sudo" and "pc-su" are used in different situations:

pc-su: This simple script simply looks for an available GRAPHICAL utility that can be used for switching user permissions. Some of the utilities that it looks for are: kdesu (for KDE desktops), gksu (for GNOME/XFCE desktops), and qsu (which is a Qt switch-user utility that was written just for PC-BSD). This is generally only used when you are graphically starting up an application that required administrator privileges (like a PBI from the application menu for instance) since we do not want to require command-line usage for graphical operations.

sudo: This is used only in scripts and/or command line application initializations because it either depends upon user input into the terminal or does not require a password at all (a couple of our utilities are setup this way, like the mounttray and life-preserver).

So both "pc-su" and "sudo" are perfectly valid methods of switching user permissions, they just have different use-cases on a PC-BSD system.

~ Ken Moore ~ PC-BSD/iXsystems

– 2013-08-27


$ freebsd-version ; man pc-su
11.0-CURRENTNOV2015
No manual entry for pc-su
$ 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.