<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JakeCubes</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JakeCubes"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/JakeCubes"/>
	<updated>2026-05-01T23:11:16Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Polkit&amp;diff=31424</id>
		<title>Polkit</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Polkit&amp;diff=31424"/>
		<updated>2025-11-09T02:38:50Z</updated>

		<summary type="html">&lt;p&gt;JakeCubes: Changed seatd&amp;#039;s auth agent incompatibility note to a warning.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://polkit.pages.freedesktop.org/polkit/polkit.8.html Polkit] is an authorization manager which is used for allowing unprivileged processes to speak to privileged processes through some form of inter-process communication mechanism like [[D-Bus]]. &lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Install and configure [[D-Bus#Installation|D-Bus]].&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
For graphical applications, polkit relies on [[Elogind|elogind]] or [[Seatd]] to determine the identity of the user making a request. To use the full features of polkit, [[#Using polkit with elogind|using polkit with elogind]] is recommended.&lt;br /&gt;
&lt;br /&gt;
=== Using polkit with elogind ===&lt;br /&gt;
&lt;br /&gt;
For a feature-rich [[Desktop environments and Window managers|desktop]] experience, use polkit with [[Elogind|elogind]]. Features like [[#Authentication agents|authentication agents]] can be used only with elogind. Install the {{Pkg|polkit-elogind}} package and enable the {{ic|polkit}} service using [[OpenRC]].&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;# apk add polkit-elogind&lt;br /&gt;
# rc-update add polkit&lt;br /&gt;
# rc-service polkit start &amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Proceed to configure [[Elogind|elogind]], if not done already.&lt;br /&gt;
&lt;br /&gt;
=== Using polkit with seatd ===&lt;br /&gt;
&lt;br /&gt;
For a minimal desktop like [[Sway]], polkit can be used with [[Seatd#Polkit|seatd with certain limitations]]. With Seatd, polkit rules can only evaluate group membership, resulting in a &#039;yes&#039; or &#039;no&#039; decision. Graphical, session aware [[#Authentication agents|authentication agents]] are not supported.  &lt;br /&gt;
&lt;br /&gt;
To proceed to use polkit with seatd, install the {{Pkg|polkit}} package and enable the {{ic|polkit}} service using [[OpenRC]]: {{Cmd|&amp;lt;nowiki&amp;gt;# apk add polkit&lt;br /&gt;
# rc-update add polkit&lt;br /&gt;
# rc-service polkit start &amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Authentication agents ==&lt;br /&gt;
&lt;br /&gt;
Polkit authentication agent integration helps coordinate the display of a password prompt to the active and local users. &lt;br /&gt;
When an unprivileged user attempts to access a privileged location (such as by typing admin:// in the address bar of a [[File_management#File_managers|File Manager]]), when the appropriate polkit policy requires administrative authentication, a password dialogue will typically appear. &lt;br /&gt;
&lt;br /&gt;
{{Warning|Authentication agents will work only when [[#Using polkit with elogind|polkit is used with elogind]].}}&lt;br /&gt;
{{Warning|Authentication agents won&#039;t work unless [[PAM]] is properly set up.}}&lt;br /&gt;
&lt;br /&gt;
Some of the authentication agents available in Alpine linux is listed below:&lt;br /&gt;
&lt;br /&gt;
* {{Pkg|xfce-polkit}}&lt;br /&gt;
* {{pkg|mate-polkit}}&lt;br /&gt;
* {{pkg|polkit-gnome}}&lt;br /&gt;
* {{pkg|polkit-kde-agent}}&lt;br /&gt;
For [[Xfce]], install {{Pkg|xfce-polkit}} as follows:{{Cmd|# apk add {{Pkg|xfce-polkit}}}}&lt;br /&gt;
&lt;br /&gt;
== Polkit rule files ==&lt;br /&gt;
&lt;br /&gt;
The following example rule files have been provided to show the limitations of [[#Using polkit with seatd|seatd]].&lt;br /&gt;
&lt;br /&gt;
Ensure that correct permissions are set for the rule files. For example, for the rule file {{Path|/etc/polkit-1/rules.d/50-udisks.rules}}:{{Cmd|&amp;lt;nowiki&amp;gt;# chown root:root /etc/polkit-1/rules.d/50-udisks.rules&lt;br /&gt;
# chmod 644 /etc/polkit-1/rules.d/50-udisks.rules&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Example1 ===&lt;br /&gt;
&lt;br /&gt;
A sample polkit rule file {{Path|/etc/polkit-1/rules.d/50-udisks.rules}} which allow [[File_management#Automounting_removable_storage|automatic mounting of removable storage]] based on being a member of &#039;&#039;&#039;disk&#039;&#039;&#039; or &#039;&#039;&#039;storage&#039;&#039;&#039; group. This rule depends only on group membership which works with seatd: {{cat|/etc/polkit-1/rules.d/50-udisks.rules|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
polkit.addRule(function(action, subject) {&lt;br /&gt;
    if (subject.isInGroup(&amp;quot;disk&amp;quot;) || subject.isInGroup(&amp;quot;storage&amp;quot;)) &amp;amp;&amp;amp;&lt;br /&gt;
        (action.id == &amp;quot;org.freedesktop.udisks2.filesystem-mount&amp;quot; ||&lt;br /&gt;
         action.id == &amp;quot;org.freedesktop.udisks2.filesystem-mount-system&amp;quot; ||&lt;br /&gt;
	action.id == &amp;quot;org.freedesktop.udisks2.filesystem-unmount-others&amp;quot; ||  &lt;br /&gt;
         action.id == &amp;quot;org.freedesktop.udisks2.drive-eject&amp;quot; ||&lt;br /&gt;
         action.id == &amp;quot;org.freedesktop.udisks2.encrypted-unlock&amp;quot; ||&lt;br /&gt;
         action.id == &amp;quot;org.freedesktop.udisks2.power-off-drive&amp;quot;)) {&lt;br /&gt;
        return polkit.Result.YES; // &lt;br /&gt;
    }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}} &lt;br /&gt;
&lt;br /&gt;
The above polkit rule file is fully supported when used with both [[#Using polkit with seatd|seatd]] and [[#Using polkit with elogind|Elogind]].&lt;br /&gt;
&lt;br /&gt;
=== Example2 ===&lt;br /&gt;
&lt;br /&gt;
[[elogind|Elogind]] is required for &amp;quot;subject.active&amp;quot; rules and no AUTH_ADMIN, since polkit agents need POLKIT_IS_SUBJECT. Given below is a sample polkit rule file {{Path|/etc/polkit-1/rules.d/51-require-active-session.rules}} which allow only active local sessions to suspend:{{Cat|/etc/polkit-1/rules.d/51-require-active-session.rules|&amp;lt;nowiki&amp;gt; &lt;br /&gt;
    polkit.addRule(function(action, subject) {&lt;br /&gt;
        if (action.id == &amp;quot;org.freedesktop.login1.suspend&amp;quot; &amp;amp;&amp;amp;&lt;br /&gt;
            subject.active) {&lt;br /&gt;
            return polkit.Result.YES;&lt;br /&gt;
        } else if (action.id == &amp;quot;org.freedesktop.login1.suspend&amp;quot;) {&lt;br /&gt;
            return polkit.Result.NO; // Or polkit.Result.AUTH_ADMIN to prompt for password&lt;br /&gt;
        }&lt;br /&gt;
    });&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}     &lt;br /&gt;
&lt;br /&gt;
The above rule file depends on &#039;&#039;subject.active&#039;&#039; which is supported only when [[#Using polkit with elogind|polkit is used with Elogind]].&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [https://polkit.pages.freedesktop.org/polkit/polkit.8.html polkit Architecture]&lt;br /&gt;
* [https://github.com/polkit-org/polkit polkit github page]&lt;br /&gt;
* [https://wiki.archlinux.org/title/Polkit  Arch wiki Polkit page]&lt;br /&gt;
* [https://wiki.archlinux.org/title/Running_GUI_applications_as_root Arch wiki Running GUI applications as root]&lt;br /&gt;
&lt;br /&gt;
[[Category:Authentication]]&lt;/div&gt;</summary>
		<author><name>JakeCubes</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=PAM&amp;diff=31423</id>
		<title>PAM</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=PAM&amp;diff=31423"/>
		<updated>2025-11-09T02:31:26Z</updated>

		<summary type="html">&lt;p&gt;JakeCubes: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To use PAM, the {{Pkg|linux-pam}} package itself must be installed as well as something for logging into the system that supports PAM. The &amp;lt;code&amp;gt;login&amp;lt;/code&amp;gt; bundled with &amp;lt;code&amp;gt;busybox&amp;lt;/code&amp;gt; does not support PAM. Instead, one of the following may be used:&lt;br /&gt;
&lt;br /&gt;
* [[greetd]] plus any greeter&lt;br /&gt;
* &amp;lt;code&amp;gt;login(1)&amp;lt;/code&amp;gt; provided by {{Pkg|shadow-login}}&lt;br /&gt;
* &amp;lt;code&amp;gt;login(1)&amp;lt;/code&amp;gt; provided by {{Pkg|util-linux-login}}&lt;br /&gt;
&lt;br /&gt;
{{warning|Login without PAM will still be possible. See {{issue|11730}}}}&lt;br /&gt;
{{warning|Polkit authentication agents tend to have issues running without PAM.}}&lt;br /&gt;
&lt;br /&gt;
== ulimit ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ulimit&amp;lt;/code&amp;gt; permissions can be changed via &amp;lt;code&amp;gt;/etc/security/limits.conf&amp;lt;/code&amp;gt;. These will only apply if a PAM-compatible tool is used for logging in (as indicated above).&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/PAM PAM on the Gentoo Wiki]&lt;br /&gt;
* [https://wiki.archlinux.org/title/PAM PAM on the ArchLinux Wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Authentication]]&lt;/div&gt;</summary>
		<author><name>JakeCubes</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Polkit&amp;diff=31422</id>
		<title>Polkit</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Polkit&amp;diff=31422"/>
		<updated>2025-11-09T02:30:09Z</updated>

		<summary type="html">&lt;p&gt;JakeCubes: /* Authentication agents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://polkit.pages.freedesktop.org/polkit/polkit.8.html Polkit] is an authorization manager which is used for allowing unprivileged processes to speak to privileged processes through some form of inter-process communication mechanism like [[D-Bus]]. &lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Install and configure [[D-Bus#Installation|D-Bus]].&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
For graphical applications, polkit relies on [[Elogind|elogind]] or [[Seatd]] to determine the identity of the user making a request. To use the full features of polkit, [[#Using polkit with elogind|using polkit with elogind]] is recommended.&lt;br /&gt;
&lt;br /&gt;
=== Using polkit with elogind ===&lt;br /&gt;
&lt;br /&gt;
For a feature-rich [[Desktop environments and Window managers|desktop]] experience, use polkit with [[Elogind|elogind]]. Features like [[#Authentication agents|authentication agents]] can be used only with elogind. Install the {{Pkg|polkit-elogind}} package and enable the {{ic|polkit}} service using [[OpenRC]].&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;# apk add polkit-elogind&lt;br /&gt;
# rc-update add polkit&lt;br /&gt;
# rc-service polkit start &amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Proceed to configure [[Elogind|elogind]], if not done already.&lt;br /&gt;
&lt;br /&gt;
=== Using polkit with seatd ===&lt;br /&gt;
&lt;br /&gt;
For a minimal desktop like [[Sway]], polkit can be used with [[Seatd#Polkit|seatd with certain limitations]]. With Seatd, polkit rules can only evaluate group membership, resulting in a &#039;yes&#039; or &#039;no&#039; decision. Graphical, session aware [[#Authentication agents|authentication agents]] are not supported.  &lt;br /&gt;
&lt;br /&gt;
To proceed to use polkit with seatd, install the {{Pkg|polkit}} package and enable the {{ic|polkit}} service using [[OpenRC]]: {{Cmd|&amp;lt;nowiki&amp;gt;# apk add polkit&lt;br /&gt;
# rc-update add polkit&lt;br /&gt;
# rc-service polkit start &amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Authentication agents ==&lt;br /&gt;
&lt;br /&gt;
Polkit authentication agent integration helps coordinate the display of a password prompt to the active and local users. &lt;br /&gt;
When an unprivileged user attempts to access a privileged location (such as by typing admin:// in the address bar of a [[File_management#File_managers|File Manager]]), when the appropriate polkit policy requires administrative authentication, a password dialogue will typically appear. &lt;br /&gt;
&lt;br /&gt;
{{Note|Authentication agents will work only when [[#Using polkit with elogind|polkit is used with elogind]].}}&lt;br /&gt;
{{Warning|Authentication agents won&#039;t work unless [[PAM]] is properly set up.}}&lt;br /&gt;
&lt;br /&gt;
Some of the authentication agents available in Alpine linux is listed below:&lt;br /&gt;
&lt;br /&gt;
* {{Pkg|xfce-polkit}}&lt;br /&gt;
* {{pkg|mate-polkit}}&lt;br /&gt;
* {{pkg|polkit-gnome}}&lt;br /&gt;
* {{pkg|polkit-kde-agent}}&lt;br /&gt;
For [[Xfce]], install {{Pkg|xfce-polkit}} as follows:{{Cmd|# apk add {{Pkg|xfce-polkit}}}}&lt;br /&gt;
&lt;br /&gt;
== Polkit rule files ==&lt;br /&gt;
&lt;br /&gt;
The following example rule files have been provided to show the limitations of [[#Using polkit with seatd|seatd]].&lt;br /&gt;
&lt;br /&gt;
Ensure that correct permissions are set for the rule files. For example, for the rule file {{Path|/etc/polkit-1/rules.d/50-udisks.rules}}:{{Cmd|&amp;lt;nowiki&amp;gt;# chown root:root /etc/polkit-1/rules.d/50-udisks.rules&lt;br /&gt;
# chmod 644 /etc/polkit-1/rules.d/50-udisks.rules&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Example1 ===&lt;br /&gt;
&lt;br /&gt;
A sample polkit rule file {{Path|/etc/polkit-1/rules.d/50-udisks.rules}} which allow [[File_management#Automounting_removable_storage|automatic mounting of removable storage]] based on being a member of &#039;&#039;&#039;disk&#039;&#039;&#039; or &#039;&#039;&#039;storage&#039;&#039;&#039; group. This rule depends only on group membership which works with seatd: {{cat|/etc/polkit-1/rules.d/50-udisks.rules|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
polkit.addRule(function(action, subject) {&lt;br /&gt;
    if (subject.isInGroup(&amp;quot;disk&amp;quot;) || subject.isInGroup(&amp;quot;storage&amp;quot;)) &amp;amp;&amp;amp;&lt;br /&gt;
        (action.id == &amp;quot;org.freedesktop.udisks2.filesystem-mount&amp;quot; ||&lt;br /&gt;
         action.id == &amp;quot;org.freedesktop.udisks2.filesystem-mount-system&amp;quot; ||&lt;br /&gt;
	action.id == &amp;quot;org.freedesktop.udisks2.filesystem-unmount-others&amp;quot; ||  &lt;br /&gt;
         action.id == &amp;quot;org.freedesktop.udisks2.drive-eject&amp;quot; ||&lt;br /&gt;
         action.id == &amp;quot;org.freedesktop.udisks2.encrypted-unlock&amp;quot; ||&lt;br /&gt;
         action.id == &amp;quot;org.freedesktop.udisks2.power-off-drive&amp;quot;)) {&lt;br /&gt;
        return polkit.Result.YES; // &lt;br /&gt;
    }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}} &lt;br /&gt;
&lt;br /&gt;
The above polkit rule file is fully supported when used with both [[#Using polkit with seatd|seatd]] and [[#Using polkit with elogind|Elogind]].&lt;br /&gt;
&lt;br /&gt;
=== Example2 ===&lt;br /&gt;
&lt;br /&gt;
[[elogind|Elogind]] is required for &amp;quot;subject.active&amp;quot; rules and no AUTH_ADMIN, since polkit agents need POLKIT_IS_SUBJECT. Given below is a sample polkit rule file {{Path|/etc/polkit-1/rules.d/51-require-active-session.rules}} which allow only active local sessions to suspend:{{Cat|/etc/polkit-1/rules.d/51-require-active-session.rules|&amp;lt;nowiki&amp;gt; &lt;br /&gt;
    polkit.addRule(function(action, subject) {&lt;br /&gt;
        if (action.id == &amp;quot;org.freedesktop.login1.suspend&amp;quot; &amp;amp;&amp;amp;&lt;br /&gt;
            subject.active) {&lt;br /&gt;
            return polkit.Result.YES;&lt;br /&gt;
        } else if (action.id == &amp;quot;org.freedesktop.login1.suspend&amp;quot;) {&lt;br /&gt;
            return polkit.Result.NO; // Or polkit.Result.AUTH_ADMIN to prompt for password&lt;br /&gt;
        }&lt;br /&gt;
    });&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}     &lt;br /&gt;
&lt;br /&gt;
The above rule file depends on &#039;&#039;subject.active&#039;&#039; which is supported only when [[#Using polkit with elogind|polkit is used with Elogind]].&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [https://polkit.pages.freedesktop.org/polkit/polkit.8.html polkit Architecture]&lt;br /&gt;
* [https://github.com/polkit-org/polkit polkit github page]&lt;br /&gt;
* [https://wiki.archlinux.org/title/Polkit  Arch wiki Polkit page]&lt;br /&gt;
* [https://wiki.archlinux.org/title/Running_GUI_applications_as_root Arch wiki Running GUI applications as root]&lt;br /&gt;
&lt;br /&gt;
[[Category:Authentication]]&lt;/div&gt;</summary>
		<author><name>JakeCubes</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=PAM&amp;diff=31421</id>
		<title>PAM</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=PAM&amp;diff=31421"/>
		<updated>2025-11-09T02:26:31Z</updated>

		<summary type="html">&lt;p&gt;JakeCubes: Polkit authentication agents such as polkit-gnome won&amp;#039;t run without PAM, and this isn&amp;#039;t mentioned anywhere in the wiki that I could find, so, to avoid others the trouble of reading through 7 different forums, I&amp;#039;ve decided it&amp;#039;s a good idea to add this warning.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To use PAM, the {{Pkg|linux-pam}} package itself must be installed as well as something for logging into the system that supports PAM. The &amp;lt;code&amp;gt;login&amp;lt;/code&amp;gt; bundled with &amp;lt;code&amp;gt;busybox&amp;lt;/code&amp;gt; does not support PAM. Instead, one of the following may be used:&lt;br /&gt;
&lt;br /&gt;
* [[greetd]] plus any greeter&lt;br /&gt;
* &amp;lt;code&amp;gt;login(1)&amp;lt;/code&amp;gt; provided by {{Pkg|shadow-login}}&lt;br /&gt;
* &amp;lt;code&amp;gt;login(1)&amp;lt;/code&amp;gt; provided by {{Pkg|util-linux-login}}&lt;br /&gt;
&lt;br /&gt;
{{warning|Login without PAM will still be possible. See {{issue|11730}}}}&lt;br /&gt;
{{warning|Polkit authentication agents tend to have issues if PAM isn&#039;t properly set up.}}&lt;br /&gt;
&lt;br /&gt;
== ulimit ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ulimit&amp;lt;/code&amp;gt; permissions can be changed via &amp;lt;code&amp;gt;/etc/security/limits.conf&amp;lt;/code&amp;gt;. These will only apply if a PAM-compatible tool is used for logging in (as indicated above).&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/PAM PAM on the Gentoo Wiki]&lt;br /&gt;
* [https://wiki.archlinux.org/title/PAM PAM on the ArchLinux Wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Authentication]]&lt;/div&gt;</summary>
		<author><name>JakeCubes</name></author>
	</entry>
</feed>