{{Header}}
{{Title|title=
privleap / leaprun
}}
{{#seo:
|description=privleap / leaprun
}}
{{passwords_mininav}}
{{intro|
privleap / leaprun
}}
= Introduction =
{{stub}}
https://github.com/Kicksecure/privleap
= privleap custom actions =
Notes:
* Works with {{Cli}} applications only!
{{IconSet|h2|1}} Boot into {{BootEntries|key=syspers}}.
Setting this up requires booting into sysmaint session.
{{IconSet|h2|2}} Create file /etc/privleap/conf.d/user-custom.conf.
{{CodeSelect|code=
sudo append-once /etc/privleap/conf.d/user-custom.conf "\
[action:user-custom]
Command=/usr/bin/user-custom
AuthorizedGroups=sudo
AuthorizedUsers=user
"
}}
{{IconSet|h2|3}} Check the privleap configuration file is valid.
{{CodeSelect|code=
privleapd --check-config
}}
If there is no output, no error message, then the configuration is valid.
{{IconSet|h2|4}} Create executable file /usr/bin/user-custom.
{{Open with root rights
|filename=/usr/bin/user-custom
}}
{{IconSet|h2|5}} Paste.
Notes:
* Replace custom-command-here with your actual custom command or commands.
* Advanced users feel free to use other script or programming languages instead.
* Optional: See folder /etc/privleap/conf.d for other examples.
{{CodeSelect|code=
#!/bin/bash
custom-command-here
}}
{{IconSet|h2|6}} Make executable.
{{CodeSelect|code=
sudo chmod +x /usr/bin/user-custom
}}
{{IconSet|h2|7}} Boot into {{BootEntries|key=userpers}}.
{{IconSet|h2|8}} Run the privleap custom action.
{{CodeSelect|code=
leaprun user-custom
}}
{{IconSet|h2|9}} Done.
The process is complete.
= privleap versus polkit =
If there was a polkit implementation in Python that could make Privleap obsolete? No, probably not.
Polkit exists only to give "yes", "no", or "ask for authentication first" answers to "can user X do Y?" questions. It is unable to actually take the requested actions itself; it assumes the caller does that.
Privleap, on the other hand, is designed to actually perform actions on behalf of the calling user.
So no, they serve two related but distinct purposes.
{{Footer}}