<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://dev1galaxy.org/extern.php?action=feed&amp;tid=2938&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / Passwordless root execution in scripts]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=2938</link>
		<description><![CDATA[The most recent posts in Passwordless root execution in scripts.]]></description>
		<lastBuildDate>Sun, 15 Dec 2019 13:21:56 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Passwordless root execution in scripts]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=19025#p19025</link>
			<description><![CDATA[<div class="quotebox"><cite>jaromil wrote:</cite><blockquote><div><div class="quotebox"><cite>HevyDevy wrote:</cite><blockquote><div><p>Tried this out today, parazyd version.&#160; Would be even better if it were hooked into bash-completion somehow.<br />Bit tedious getting all the programs you want run as root via the user.</p></div></blockquote></div><p>do you mean having &quot;sup [tab]&quot; and complete with a list of commands configured?</p><p>interesting feature indeed, shell code could be generated by sup.</p></div></blockquote></div><p>yes that would be a nice patch.</p>]]></description>
			<author><![CDATA[dummy@example.com (HevyDevy)]]></author>
			<pubDate>Sun, 15 Dec 2019 13:21:56 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=19025#p19025</guid>
		</item>
		<item>
			<title><![CDATA[Re: Passwordless root execution in scripts]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=19020#p19020</link>
			<description><![CDATA[<div class="quotebox"><cite>HevyDevy wrote:</cite><blockquote><div><p>Tried this out today, parazyd version.&#160; Would be even better if it were hooked into bash-completion somehow.<br />Bit tedious getting all the programs you want run as root via the user.</p></div></blockquote></div><p>do you mean having &quot;sup [tab]&quot; and complete with a list of commands configured?</p><p>interesting feature indeed, shell code could be generated by sup.</p>]]></description>
			<author><![CDATA[dummy@example.com (jaromil)]]></author>
			<pubDate>Sun, 15 Dec 2019 12:50:58 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=19020#p19020</guid>
		</item>
		<item>
			<title><![CDATA[Re: Passwordless root execution in scripts]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=18998#p18998</link>
			<description><![CDATA[<div class="quotebox"><cite>siva wrote:</cite><blockquote><div><div class="quotebox"><cite>jaromil wrote:</cite><blockquote><div><p>This software may be useful for your use-case: <a href="https://sup.dyne.org/" rel="nofollow">https://sup.dyne.org/</a></p><p>There is also a more minimalist (suckless) version that parazyd maintains here <a href="http://parazyd.org/git/sup/log.html" rel="nofollow">http://parazyd.org/git/sup/log.html</a></p></div></blockquote></div><p>This looks great.&#160; Can&#039;t wait to try it out.&#160; Thanks, jaromil.</p><p>UPDATE: Weird, parazyd&#039;s version won&#039;t run the command as root (setgid failed) unless &quot;sudo&quot; is prepended.&#160; But, it looks liket the permissions are set correctly.</p><div class="codebox"><pre><code>-rws--x--x 1 omega staff 763024 Dec 13 05:22 /usr/local/bin/sup*</code></pre></div></div></blockquote></div><p>Tried this out today, parazyd version.&#160; Would be even better if it were hooked into bash-completion somehow.<br />Bit tedious getting all the programs you want run as root via the user.</p>]]></description>
			<author><![CDATA[dummy@example.com (HevyDevy)]]></author>
			<pubDate>Sat, 14 Dec 2019 09:18:50 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=18998#p18998</guid>
		</item>
		<item>
			<title><![CDATA[Re: Passwordless root execution in scripts]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=18995#p18995</link>
			<description><![CDATA[<p>jaromil - thank you for pointing out <span class="bbc">sup</span>, I wasn&#039;t aware of it. I love it already. Small is beautiful!</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Fri, 13 Dec 2019 15:19:26 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=18995#p18995</guid>
		</item>
		<item>
			<title><![CDATA[Re: Passwordless root execution in scripts]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=18992#p18992</link>
			<description><![CDATA[<p>Even if user makes a shell script SUID, the linux kernel will ignore it because it&#039;s a major security risk. <a href="https://unix.stackexchange.com/a/2910" rel="nofollow">https://unix.stackexchange.com/a/2910</a></p><p>Here is a simple demonstration of how SUID is set, but kernel ignores it:</p><div class="codebox"><pre><code>$ echo &#039;#!/bin/sh
apt update&#039; &gt;testing
$ chmod a+x ./testing
$ sudo chown root:root ./testing
$ sudo chmod u+s ./testing
$ ls -l ./testing
-rwsr-xr-x 1 root root 21 Dec 13 09:43 ./testing # the &#039;s&#039; shows that SUID bit is set
$ ./testing
Reading package lists... Done
W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)</code></pre></div><p>Permission is denied because the script is running as regular user, not root (i.e., SUID was ignored).</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Fri, 13 Dec 2019 14:45:43 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=18992#p18992</guid>
		</item>
		<item>
			<title><![CDATA[Re: Passwordless root execution in scripts]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=18989#p18989</link>
			<description><![CDATA[<p>The SUID bit makes the executable run as the owner of the executable.</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Fri, 13 Dec 2019 12:02:00 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=18989#p18989</guid>
		</item>
		<item>
			<title><![CDATA[Re: Passwordless root execution in scripts]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=18976#p18976</link>
			<description><![CDATA[<div class="quotebox"><cite>jaromil wrote:</cite><blockquote><div><p>This software may be useful for your use-case: <a href="https://sup.dyne.org/" rel="nofollow">https://sup.dyne.org/</a></p><p>There is also a more minimalist (suckless) version that parazyd maintains here <a href="http://parazyd.org/git/sup/log.html" rel="nofollow">http://parazyd.org/git/sup/log.html</a></p></div></blockquote></div><p>This looks great.&#160; Can&#039;t wait to try it out.&#160; Thanks, jaromil.</p><p>UPDATE: Weird, parazyd&#039;s version won&#039;t run the command as root (setgid failed) unless &quot;sudo&quot; is prepended.&#160; But, it looks liket the permissions are set correctly.</p><div class="codebox"><pre><code>-rws--x--x 1 omega staff 763024 Dec 13 05:22 /usr/local/bin/sup*</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (siva)]]></author>
			<pubDate>Fri, 13 Dec 2019 03:57:21 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=18976#p18976</guid>
		</item>
		<item>
			<title><![CDATA[Re: Passwordless root execution in scripts]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=18966#p18966</link>
			<description><![CDATA[<div class="quotebox"><cite>jaromil wrote:</cite><blockquote><div><p>This software may be useful for your use-case: <a href="https://sup.dyne.org/" rel="nofollow">https://sup.dyne.org/</a></p><p>There is also a more minimalist (suckless) version that parazyd maintains here <a href="http://parazyd.org/git/sup/log.html" rel="nofollow">http://parazyd.org/git/sup/log.html</a></p></div></blockquote></div><p>Im considering using sup,&#160; looks to be a more simple way of privilege escalation in a higher order programming language. Im already using many of the suckless tools for my setup so i should probably add this and test it.</p>]]></description>
			<author><![CDATA[dummy@example.com (HevyDevy)]]></author>
			<pubDate>Thu, 12 Dec 2019 14:28:21 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=18966#p18966</guid>
		</item>
		<item>
			<title><![CDATA[Re: Passwordless root execution in scripts]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=18964#p18964</link>
			<description><![CDATA[<p>This software may be useful for your use-case: <a href="https://sup.dyne.org/" rel="nofollow">https://sup.dyne.org/</a></p><p>There is also a more minimalist (suckless) version that parazyd maintains here <a href="http://parazyd.org/git/sup/log.html" rel="nofollow">http://parazyd.org/git/sup/log.html</a></p>]]></description>
			<author><![CDATA[dummy@example.com (jaromil)]]></author>
			<pubDate>Thu, 12 Dec 2019 10:23:27 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=18964#p18964</guid>
		</item>
		<item>
			<title><![CDATA[Re: Passwordless root execution in scripts]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=18949#p18949</link>
			<description><![CDATA[<p>Isn&#039;t SUID X a bad idea?</p><p>I know Devuan doesn&#039;t need a wrapper for rootless X any more.</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Wed, 11 Dec 2019 13:41:11 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=18949#p18949</guid>
		</item>
		<item>
			<title><![CDATA[Re: Passwordless root execution in scripts]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=18944#p18944</link>
			<description><![CDATA[<div class="quotebox"><cite>siva wrote:</cite><blockquote><div><p>Thanks, I will give this a read.&#160; This is all uncharted territory for me.</p></div></blockquote></div><p>Me too, ive no experience with any of this but i found it interesting when i came across how Xorg.wrap works with suid.</p>]]></description>
			<author><![CDATA[dummy@example.com (HevyDevy)]]></author>
			<pubDate>Wed, 11 Dec 2019 11:16:04 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=18944#p18944</guid>
		</item>
		<item>
			<title><![CDATA[Re: Passwordless root execution in scripts]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=18926#p18926</link>
			<description><![CDATA[<p>Thanks, I will give this a read.&#160; This is all uncharted territory for me.</p>]]></description>
			<author><![CDATA[dummy@example.com (siva)]]></author>
			<pubDate>Tue, 10 Dec 2019 20:18:31 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=18926#p18926</guid>
		</item>
		<item>
			<title><![CDATA[Re: Passwordless root execution in scripts]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=18918#p18918</link>
			<description><![CDATA[<div class="quotebox"><cite>siva wrote:</cite><blockquote><div><p>I think what I&#039;m looking for might be <span class="bbc">setuid</span>: something like <strong>root:netdev</strong> ownership and <strong>4750</strong> permissions.&#160; It looks like this is a contentious solution for scripts, as opposed to binaries.</p><p>I read that if someone were to compromise the setuid binary, it would widen the attack surface.&#160; Then again, to do something like that, I imagine they&#039;d need root access -- so, I&#039;m not sure I understand or appreciate the difference.</p></div></blockquote></div><p>You might get some hints from <a href="https://manpages.debian.org/stretch/xserver-xorg-legacy/Xwrapper.config.5.en.html" rel="nofollow">https://manpages.debian.org/stretch/xse … .5.en.html</a></p>]]></description>
			<author><![CDATA[dummy@example.com (HevyDevy)]]></author>
			<pubDate>Tue, 10 Dec 2019 13:57:30 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=18918#p18918</guid>
		</item>
		<item>
			<title><![CDATA[Re: Passwordless root execution in scripts]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=18896#p18896</link>
			<description><![CDATA[<p>I think what I&#039;m looking for might be <span class="bbc">setuid</span>: something like <strong>root:netdev</strong> ownership and <strong>4750</strong> permissions.&#160; It looks like this is a contentious solution for scripts, as opposed to binaries.</p><p>I read that if someone were to compromise the setuid binary, it would widen the attack surface.&#160; Then again, to do something like that, I imagine they&#039;d need root access -- so, I&#039;m not sure I understand or appreciate the difference.</p>]]></description>
			<author><![CDATA[dummy@example.com (siva)]]></author>
			<pubDate>Tue, 10 Dec 2019 01:06:20 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=18896#p18896</guid>
		</item>
		<item>
			<title><![CDATA[Re: Passwordless root execution in scripts]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=16873#p16873</link>
			<description><![CDATA[<div class="quotebox"><cite>siva wrote:</cite><blockquote><div><p>apps like wicd seem to only need group access in order to perform wpasupplicant tasks (wireshark to perform tcpdump, etc).&#160; I&#039;m wondering how these are configured to do so.</p></div></blockquote></div><p>The devices are under the ownership of the relevant groups, for example:</p><div class="codebox"><pre><code>E485:~$ find /dev -group netdev
/dev/rfkill
E485:~$ ls -l /dev/rfkill
crw-rw-r-- 1 root netdev 10, 58 Jul  6 20:45 /dev/rfkill
E485:~$</code></pre></div><p>So users in the <em>netdev</em> group can use rfkill(8).</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Sat, 06 Jul 2019 20:45:19 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=16873#p16873</guid>
		</item>
	</channel>
</rss>
