<?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=5010&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / [SOLVED] Simple Netaid]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=5010</link>
		<description><![CDATA[The most recent posts in [SOLVED] Simple Netaid.]]></description>
		<lastBuildDate>Sun, 18 Dec 2022 02:23:55 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: [SOLVED] Simple Netaid]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=39464#p39464</link>
			<description><![CDATA[<p>Recently i&#039;ve done several improvements in the sources of simple-netaid and i would like to share with you a brief tutorial explaining how to build it from source. The procedure has been tested in Void Linux and Slackware, but i had trouble running ifupdown in the later. Bear in mind that <strong>ifupdown</strong> is debian specific, though it&#039;s also used in a few independent distributions like Void and Alpine Linux. I still didn&#039;t try to build simple-netaid in Alpine, hence i&#039;ll specify the build dependencies only for devuan and void.</p><p>In de{bi,vu}an you can install them via apt:</p><div class="codebox"><pre><code># apt-get install git-core build-essential pkg-config autoconf automake libtool intltool libiw-dev libcdk5-dev \
gettext libjson-c-dev libprocps-dev libsigc++-2.0-dev libncurses-dev libvte-2.91-dev libgtk-3-dev</code></pre></div><p>In Void the packages can be installed using the <strong>xbps</strong> package manager:</p><div class="codebox"><pre><code># xbps-install git base-devel pkgconf autoconf automake libtool intltool gettext-devel json-c-devel \
procps-ng-devel libsigc++-devel ncurses-devel vte-3-devel gtk+3-devel</code></pre></div><p>Both libiw-dev (i.e. wireless-tools) and cdk5 are missing in the void repo, and we&#039;ll need to build them from source. In summary, we&#039;re going to build the projects below:</p><ul><li><p>libpstat</p></li></ul><ul><li><p>libubox</p></li></ul><ul><li><p>ubus</p></li></ul><ul><li><p>wireless-tools (only in Void)</p></li></ul><ul><li><p>libnetaid</p></li></ul><ul><li><p>snetaid</p></li></ul><ul><li><p>cdk5 (only in Void)</p></li></ul><ul><li><p>simple-netaid-cdk</p></li></ul><ul><li><p>simple-netaid-vte3 (optional)</p></li></ul><p><strong> - <span class="bbu">Installing LIBPSTAT</span></strong></p><p>Developed by Jude Nelson, libpstat is a small library for getting information on running processes in an OS-agnostic way. The source is available in his git repository, but i added a few extras to suit the needs of simple-netaid. Build it as follows:</p><div class="codebox"><pre><code>$ git clone https://git.devuan.org/aitor_czr/libpstat.git
$ cd libpstat
$ make OS=LINUX</code></pre></div><p>Now install it as root:</p><div class="codebox"><pre><code># make install PREFIX=/usr/local</code></pre></div><p><strong> - <span class="bbu">Installing LIBUBOX</span></strong></p><p>This consists of a set of utilities, mostly wrappers, that are used by many <strong>OpenWrt</strong> projects. In this case, it&#039;s present in Ubus. The original code (developed by Felix Fietkau) uses the cmake build system, but i replaced it with gnu make:</p><div class="codebox"><pre><code>$ git clone https://git.devuan.org/aitor_czr/libubox.git
$ cd libubox
$ make</code></pre></div><p>As root:</p><div class="codebox"><pre><code># make install PREFIX=/usr/local</code></pre></div><p><strong> - <span class="bbu">Installing UBUS</span></strong></p><p>Ubus is a system level micro bus architecture basically consistent with DBus. Again, i replaced cmake with the gnu autotools build system (instead of make in this case, because ubus is daemonized and the autotools provide configuration flags suitable for the different scenarios the end user may face depending on the installed init system).</p><p>To build the sources you&#039;ll have to export the <strong>PKG_CONFIG_PATH</strong> variable in order to find the libubox library. In Void:</p><div class="codebox"><pre><code>$ export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig</code></pre></div><p>In devuan:</p><div class="codebox"><pre><code>$ export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/local/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/pkgconfig</code></pre></div><p>Download and build the source:</p><div class="codebox"><pre><code>$ git clone https://git.devuan.org/aitor_czr/libubus.git
$ cd libubus
$ autoreconf -i -f</code></pre></div><p>At this point, in devuan with sysvinit run the following command:</p><div class="codebox"><pre><code>$ ./configure --prefix=/usr/local --disable-runit
$ make</code></pre></div><p>In Void with runit:</p><div class="codebox"><pre><code>$ ./configure --prefix=/usr/local --disable-sysvinit
$ make</code></pre></div><p>You can now install ubus:</p><div class="codebox"><pre><code># make install</code></pre></div><p>You&#039;ll face <strong>&quot;libtool: warning: remember to run &#039;<ins>libtool --finish /usr/local/lib</ins>&#039;&quot;</strong> warning because libtool complains that the prefix specified in the during the <span class="bbc">make</span> phase is different from the one you have when you run <span class="bbc">make install</span>. But it&#039;s a harmless warning and you don&#039;t need to do anything.</p><p><strong> - <span class="bbu">Installing WIRELESS-TOOLS</span> (<ins>Only in VOID LINUX</ins>)</strong></p><p>You can download it from the Hewlett Packard repo:</p><div class="codebox"><pre><code>$ git clone https://github.com/HewlettPackard/wireless-tools.git
$ cd wireless-tools/wireless_tools
$ make</code></pre></div><p>As root:</p><div class="codebox"><pre><code># make install</code></pre></div><p><strong> - <span class="bbu">Installing LIBNETAID</span></strong></p><p>This library consists of some C bindings for the high level ifupdown network manager. Download and build it as follows:</p><div class="codebox"><pre><code>$ git clone https://git.devuan.org/aitor_czr/libnetaid.git
$ cd libnetaid
$ make</code></pre></div><p>As root:</p><div class="codebox"><pre><code>#make install</code></pre></div><p><strong> - <span class="bbu">Installing SNETAID</span></strong></p><p>Configuration daemon for simple-netaid. For the same reason than Ubus, it uses the gnu autotools build system:</p><div class="codebox"><pre><code>$ git clone https://git.devuan.org/aitor_czr/snetaid.git
$ cd snetaid
$ autoreconf -i -f</code></pre></div><p>In devuan with sysvinit:</p><div class="codebox"><pre><code>$ ./configure --prefix=/usr/local --disable-runit
$ make</code></pre></div><p>In Void with runit:</p><div class="codebox"><pre><code>$ ./configure --prefix=/usr/local --disable-sysvinit
$ make</code></pre></div><p>You can now install snetaid:</p><div class="codebox"><pre><code># make install</code></pre></div><p><strong> - <span class="bbu">Configuring snetaid</span></strong></p><p>Once the installation of snetaid completes, you need to create your user account. First of all create a new group named <span class="bbc">snetaid</span> and add yourself to the group:</p><div class="codebox"><pre><code># groupadd netaid
# usermod -aG netaid $USER</code></pre></div><p>Now issue the <span class="bbc">ldconfig</span> command before starting the installed daemon (in some systems -e.g. Slackware- you may need to add the line <span class="bbc">/usr/local/lib</span> to your <span class="bbc">/etc/ld.so.conf</span>):</p><div class="codebox"><pre><code># ldconfig</code></pre></div><p>After that, you&#039;ll be able to start snetaid. In devuan with sysvinit:</p><div class="codebox"><pre><code># service snetaid start</code></pre></div><p>In Void with runit:</p><div class="codebox"><pre><code># sv start snetaid</code></pre></div><p>At this point, i recommend you to reboot the system other than restarting the daemons to ensure that both ubus and snetaid start automatically without issues during the boot process. If everything went as spected, the output of <span class="bbc">ubus -v list</span> should look similar to this:</p><div class="codebox"><pre><code>$ ubus -v list
&#039;ering.netaid&#039; @0dc00e91
    &quot;interface_down&quot;:{&quot;id&quot;:&quot;Integer&quot;,&quot;ifname&quot;:&quot;String&quot;}
    &quot;interface_up&quot;:{&quot;id&quot;:&quot;Integer&quot;,&quot;ifname&quot;:&quot;String&quot;}
    &quot;ifdown&quot;:{&quot;id&quot;:&quot;Integer&quot;,&quot;ifname&quot;:&quot;String&quot;,&quot;tty&quot;:&quot;Integer&quot;}
    &quot;ifup&quot;:{&quot;id&quot;:&quot;Integer&quot;,&quot;ifname&quot;:&quot;String&quot;,&quot;tty&quot;:&quot;Integer&quot;}
    &quot;ipaddr_flush&quot;:{&quot;id&quot;:&quot;Integer&quot;,&quot;ifname&quot;:&quot;String&quot;}
    &quot;wpa_passphrase&quot;:{&quot;id&quot;:&quot;Integer&quot;,&quot;essid&quot;:&quot;String&quot;,&quot;passwd&quot;:&quot;String&quot;,&quot;filename&quot;:&quot;String&quot;}
    &quot;wpa_supplicant&quot;:{&quot;id&quot;:&quot;Integer&quot;,&quot;ifname&quot;:&quot;String&quot;,&quot;filename&quot;:&quot;String&quot;,&quot;tty&quot;:&quot;Integer&quot;}
    &quot;uninstall&quot;:{&quot;id&quot;:&quot;Integer&quot;,&quot;filename&quot;:&quot;String&quot;}
    &quot;scan_active_wifis&quot;:{&quot;id&quot;:&quot;Integer&quot;,&quot;ifname&quot;:&quot;String&quot;}</code></pre></div><p><strong> - <span class="bbu">Installing CDK5</span> (<ins>Only in VOID LINUX</ins>)</strong></p><p>Download the source from debian and build it:</p><div class="codebox"><pre><code>$ git clone https://salsa.debian.org/debian/libcdk5.git
$ cd libcdk5
$ ./configure
$ make</code></pre></div><p>This should go quickly. Once it&#039;s built, install it as root:</p><div class="codebox"><pre><code># make install</code></pre></div><p><strong> - <span class="bbu">Installing SIMPLE-NETAID-CDK</span></strong></p><p>This is a curses interface for simple-netaid. Build it with make:</p><div class="codebox"><pre><code>$ git clone https://git.devuan.org/aitor_czr/simple-netaid-cdk.git
$ cd simple-netaid-cdk
$ make</code></pre></div><p>And install it as root:</p><div class="codebox"><pre><code># make install PREFIX=/usr/local</code></pre></div><p><strong> - <span class="bbu">Installing SIMPLE-NETAID-VTE3</span></strong></p><p>This is an optional Gtk container for the curses interface of simple-netaid. Build it with make in thje same way as the earlier:</p><div class="codebox"><pre><code>$ git clone https://git.devuan.org/aitor_czr/simple-netaid-vte3.git
$ cd simple-netaid-vte3
$ make</code></pre></div><p>And install it as root:</p><div class="codebox"><pre><code># make install PREFIX=/usr/local</code></pre></div><p>The launcher should appear in the menu right now.</p><p><strong> - <span class="bbu">Final steps</span></strong></p><p>The last step is to install some runtime dependencies and configure ifupdown. In devuan:</p><div class="codebox"><pre><code># apt-get install ifupdown wpa-supplicant isc-dhcp-client lsb-base</code></pre></div><p>In Void:</p><div class="codebox"><pre><code># xbps-install ifupdown wpa_supplicant dhcpcd</code></pre></div><p>Void Linux uses <span class="bbc">NetworkManager</span> by default, but it&#039;s highly recommended to disable it when using ifupdown. You can type:</p><div class="codebox"><pre><code># touch /etc/sv/NetworkManager/down</code></pre></div><p>to prevent the runit from starting NetworkManager on boot.</p><p>Finally, add the following lines to the file <span class="bbc">/etc/network/interfaces</span>, which has been installed together with ifupdown:</p><div class="codebox"><pre><code>auto lo
iface lo inet loopback

iface &lt;wired_device&gt; inet dhcp
iface &lt;wireless_device&gt; inet dhcp</code></pre></div><p><ins>Note</ins>: I suggest to by-pass stanzas like <span class="bbc">auto</span> and <span class="bbc">allow-hotplug</span> in the configuration of ifupdown, because they may delay the boot process. The master branch of simple netaid will react to the <span class="bbc">plug-in</span> events of the ethernet cable without the need of any other standalone application like <span class="bbc">ifplugd</span> or <span class="bbc">netplug</span>. Therefore, the system will be automatically connected to the network no matter whether or not the cable was plugged in during the boot process, as long as the interface is up when the event occurs.</p>]]></description>
			<author><![CDATA[dummy@example.com (aitor)]]></author>
			<pubDate>Sun, 18 Dec 2022 02:23:55 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=39464#p39464</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Simple Netaid]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=35806#p35806</link>
			<description><![CDATA[<div class="quotebox"><cite>aitor wrote:</cite><blockquote><div><p>the <strong>automatically connect</strong> option of simple-netaid is still a <span class="bbu">work in progress</span>.</p></div></blockquote></div><p>To automatically connect <span class="bbc">eth0</span> i have both:</p><div class="codebox"><pre><code>auto eth0
allow-hotplug eth0
.......</code></pre></div><p>in my <strong>/etc/network/interfaces</strong>, and there is no need for <span class="bbc">ifplugd</span>, no need for <span class="bbc">netplug</span>. Hence, the <strong>automatically connect</strong> option of <span class="bbc">simple-netaid</span> will involve only <em>wireless</em> interfaces.</p>]]></description>
			<author><![CDATA[dummy@example.com (aitor)]]></author>
			<pubDate>Sat, 30 Apr 2022 17:22:07 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=35806#p35806</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Simple Netaid]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=35804#p35804</link>
			<description><![CDATA[<p>I did another important change in the daemon. In relatively old hardware, i noticed a random behavior during the boot process which often crashed upon unsuccesful attempts trying to register the netlink kernel socket. Appearently, the origin of this failure was in the fact that the networking script of ifupdown was still running when snetaid started. The daemon of simple-netaid forks an asynchronous child, resulting on a couple of process IDs: on the one hand the ubus loop waiting for requests in the client side (parent), and the netlink monitor on the other hand (child). I solved the problem above mentioned by adding a routine called <span class="bbu">wait_on_ifupdown</span>() before trying to bind the netlink socket in the child process.</p><p>Let&#039;s clarify further that this issue was a side-effect of handling both ifupdown and simple-netaid with runit, and i think that this wouldn&#039;t occur in the case of sysvinit. It happened that i migrated the networking script of ifupdown from <strong>/etc/init.d/networking</strong> to <strong>/etc/sv/networking/run</strong> and <ins>this approach seems to bring a definitive end to the problem of the slow boot waiting for network</ins> when the ethernet cable is unpluged, caused by stanzas like <span class="bbc">auto eth0</span> and <span class="bbc">allow-hotplug eth0</span> in <strong>/etc/network/interfaces</strong>.</p><p>You can verify this fact in the live images of gnuinos chimaera, but i need testers to confirm this point <img src="http://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (aitor)]]></author>
			<pubDate>Sat, 30 Apr 2022 16:37:27 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=35804#p35804</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Simple Netaid]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=35800#p35800</link>
			<description><![CDATA[<div class="quotebox"><cite>aitor wrote:</cite><blockquote><div><p>My wifi connection attempts are failing under 32 bits, and i still don&#039;t know why... I wonder if anyone is experiencing something similar</p></div></blockquote></div><p>I solved this issue yesterday night. I did a mistake in the format of one of the functions used in <em>policy.c</em> (snetaid) that affected only to 32 bit binaries. I&#039;ve just uploaded the new packages, and updated the isos as well:</p><p> <a href="https://www.gnuinos.org/mirror/chimaera/live/" rel="nofollow">https://www.gnuinos.org/mirror/chimaera/live/</a></p>]]></description>
			<author><![CDATA[dummy@example.com (aitor)]]></author>
			<pubDate>Sat, 30 Apr 2022 07:36:15 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=35800#p35800</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Simple Netaid]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=35797#p35797</link>
			<description><![CDATA[<p>My wifi connection attempts are failing under 32 bits, and i still don&#039;t know why... I wonder if anyone is experiencing something similar</p>]]></description>
			<author><![CDATA[dummy@example.com (aitor)]]></author>
			<pubDate>Fri, 29 Apr 2022 19:59:09 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=35797#p35797</guid>
		</item>
		<item>
			<title><![CDATA[[SOLVED] Simple Netaid]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=35789#p35789</link>
			<description><![CDATA[<p>As I announced a few days ago in the mailing list, the new version of <strong>simple-netaid</strong> relies on the <strong>OpenWRT microbus architecture (Ubus)</strong>:</p><p><a href="https://openwrt.org/docs/techref/ubus" rel="nofollow">https://openwrt.org/docs/techref/ubus</a></p><p>Over a period of testing time, I thing the most recent packaging of simple-netaid can be considered stable enough for daily use. Latest packages have been upload to <a href="http://packages.gnuinos.org" rel="nofollow">packages.gnuinos.org</a> yesterday night. In this section, I&#039;m going to explain how to install and test them under devuan chimaera. </p><p>The following steps have been tested after a fresh install of <span class="bbu">devuan chimaera xfce</span>. First of all, download and install the GnuPG key of gnuinos:</p><div class="codebox"><pre><code>$ wget http://packages.gnuinos.org/gnuinos/pool/main/g/gnuinos-keyring/gnuinos-keyring_2020.05.03_all.deb
$ sudo dpkg -i gnuinos-keyring_2020.05.03_all.deb</code></pre></div><p>Now you&#039;ll be able to add the gnuinos repo temporarily to your system:</p><div class="codebox"><pre><code>$ sudo su
# echo &quot;deb http://packages.gnuinos.org/merged chimaera main&quot; &gt; /etc/apt/sources.list.d/gnuinos.list
# apt-get update</code></pre></div><p>After updating the repository, just install <span class="bbc">simple-netaid-vte3</span>, and the following dependencies will be installed together with it:</p><div class="codebox"><pre><code># apt-get install simple-netaid-vte3
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias... Hecho
Leyendo la información de estado... Hecho
Se instalarán los siguientes paquetes adicionales:
  libcdk5nc6 libiw30 libnetaid0 libpstat libubox0 libubus0 runit-helper simple-netaid-cdk snetaid ubus
Se instalarán los siguientes paquetes NUEVOS:
  libcdk5nc6 libiw30 libnetaid0 libpstat libubox0 libubus0 runit-helper simple-netaid-cdk simple-netaid-vte3 snetaid ubus
0 actualizados, 11 nuevos se instalarán, 0 para eliminar y 32 no actualizados.
Se necesita descargar 1.046 kB de archivos.
Se utilizarán 3.941 kB de espacio de disco adicional después de esta operación.
¿Desea continuar? [S/n]</code></pre></div><p>Other runtime dependencies that were already installed after my fresh install of devuan chimaera are:</p><p><ins><br />ifupdown</ins> ,&#160; <ins>wpasupplicant</ins> ,&#160; <ins>isc-dhcp-client</ins> ,&#160; <ins>procps</ins> ,&#160; <ins>coreutils<br /></ins></p><p>Simple-netaid-vte3 consists of a Gtk container for the ncurses interface of simple-netaid that provides, beyond the systray icon, a paned vte-terminal where both system calls of the ubus service and the info about the routing table netlink events are sent to, as you can see in the image below.</p><p><span class="postimg"><img src="https://gnuinos.org/simple-netaid-vte3/Captura%20de%20pantalla_2022-04-28_13-57-39.png" alt="Captura%20de%20pantalla_2022-04-28_13-57-39.png" /></span></p><p>Once simple-netaid has been installed, it&#039;s highly recommended to remove network-manager:</p><div class="codebox"><pre><code># dpkg --purge network-manager-gnome network-manager</code></pre></div><p>Now configure the content of <span class="bbc">/etc/network/interfaces</span> to suite your needs. One sample:</p><div class="codebox"><pre><code># This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet dhcp</code></pre></div><p>Reboot the system. If everything goes right, <span class="bbc">ubus -v list</span> will find out the complete list of procedures and their argument signatures the specific service <span class="bbc">ering.netaid</span> provides:</p><div class="codebox"><pre><code>$ sudo ubus -v list
[sudo] password for aitor: 
&#039;ering.netaid&#039; @2b86f84a
	&quot;interface_down&quot;:{&quot;id&quot;:&quot;Integer&quot;,&quot;ifname&quot;:&quot;String&quot;}
	&quot;interface_up&quot;:{&quot;id&quot;:&quot;Integer&quot;,&quot;ifname&quot;:&quot;String&quot;}
	&quot;ifdown&quot;:{&quot;id&quot;:&quot;Integer&quot;,&quot;ifname&quot;:&quot;String&quot;,&quot;tty&quot;:&quot;Integer&quot;}
	&quot;ifup&quot;:{&quot;id&quot;:&quot;Integer&quot;,&quot;ifname&quot;:&quot;String&quot;,&quot;tty&quot;:&quot;Integer&quot;}
	&quot;ipaddr_flush&quot;:{&quot;id&quot;:&quot;Integer&quot;,&quot;ifname&quot;:&quot;String&quot;}
	&quot;wpa_passphrase&quot;:{&quot;id&quot;:&quot;Integer&quot;,&quot;essid&quot;:&quot;String&quot;,&quot;passwd&quot;:&quot;String&quot;,&quot;filename&quot;:&quot;String&quot;}
	&quot;wpa_supplicant&quot;:{&quot;id&quot;:&quot;Integer&quot;,&quot;ifname&quot;:&quot;String&quot;,&quot;filename&quot;:&quot;String&quot;,&quot;tty&quot;:&quot;Integer&quot;}
	&quot;uninstall&quot;:{&quot;id&quot;:&quot;Integer&quot;,&quot;filename&quot;:&quot;String&quot;}
	&quot;scan_active_wifis&quot;:{&quot;id&quot;:&quot;Integer&quot;,&quot;ifname&quot;:&quot;String&quot;}</code></pre></div><p>Run simple-netaid from the menu:</p><p><span class="postimg"><img src="https://gnuinos.org/simple-netaid-vte3/Captura%20de%20pantalla_2022-04-28_13-52-24.png" alt="Captura%20de%20pantalla_2022-04-28_13-52-24.png" /></span></p><p>Alternatively, if you want to automatically start simple-netaid when the session is loaded, just specify <span class="bbc">simple-netaid-vte3 --systray</span> in the dialog displayed via:</p><p><strong>Settings Manager -&gt; Session and Startup -&gt; Application Autostart -&gt; Add</strong>:</p><p><span class="postimg"><img src="https://gnuinos.org/simple-netaid-vte3/Captura%20de%20pantalla_2022-04-28_15-02-12.png" alt="Captura%20de%20pantalla_2022-04-28_15-02-12.png" /></span></p><p>And the application will be iconified in your systray:</p><p><span class="postimg"><img src="https://gnuinos.org/simple-netaid-vte3/Captura%20de%20pantalla_2022-04-28_13-53-32.png" alt="Captura%20de%20pantalla_2022-04-28_13-53-32.png" /></span></p><p>The first time you lanch simple-netaid a warning dialog will tell you that you need to be added to the <strong>netaid group</strong>:</p><p><span class="postimg"><img src="https://gnuinos.org/simple-netaid-vte3/Captura%20de%20pantalla_2022-04-28_13-44-37.png" alt="Captura%20de%20pantalla_2022-04-28_13-44-37.png" /></span></p><p>After adding yourself to the netaid group by typing:</p><div class="codebox"><pre><code># usermod -aG netaid &lt;username&gt;</code></pre></div><p>you should be able to call a given procedure within the <span class="bbc">ering.netaid</span> namespace passing arguments to it as a regular user without granted permissions. For instance (ignore the first argument &quot;id&quot; so far):</p><div class="codebox"><pre><code>$ ubus call ering.netaid ifdown &#039;{ &quot;ifname&quot;: &quot;eth0&quot; , &quot;tty&quot;: 4 }&#039;</code></pre></div><p>will invoke <span class="bbc">/sbin/ifdown eth0</span> in the server side, and the system call will be thrown afterwards to the client side as long as the user specifies the current tty passed throughout the last argument signature (i.e. tty). For the sake of the example, we assumed above that</p><div class="codebox"><pre><code>$ tty
/dev/pts/4</code></pre></div><p>In doing so, the <strong>root-owned</strong> program <span class="bbc">ifupdown</span> will be executed within the <strong>non-privileged</strong> console session:</p><div class="codebox"><pre><code>$ ubus call ering.netaid ifdown &#039;{ &quot;ifname&quot;: &quot;eth0&quot; , &quot;tty&quot;: 4 }&#039;
Killed old client process
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/........ blah blah blah</code></pre></div><p>The <span class="bbc">ACLs</span> are located in <span class="bbc">/usr/share/acl.d</span>. Concretly, simple-netaid involves <span class="bbc">netaid-server.json</span>:</p><div class="codebox"><pre><code>{
  
   &quot;group&quot;: &quot;netaid&quot;,
   
   &quot;access&quot;: {

      &quot;ering.netaid&quot;: {

          &quot;methods&quot;: [ 
                       &quot;interface_down&quot; , 
                       &quot;interface_up&quot; , 
                       &quot;ifup&quot; , 
                       &quot;ifdown&quot; , 
                       &quot;ipaddr_flush&quot; , 
                       &quot;wpa_passphrase&quot; , 
                       &quot;wpa_supplicant&quot; , 
                       &quot;uninstall&quot; , 
                       &quot;scan_active_wifis&quot;
                     ]
      }
      
   }
   
}</code></pre></div><p>This configuration is customizable. For example, it&#039;s possible to use something like <strong>&quot;user&quot;: &quot;devuanita&quot;</strong> or even wildcards (*), as explained in the website of the OpenWRT project.</p><p>To end with, don&#039;t forget to revert the changes in your repository, removing <strong>packages.gnuinos.org</strong><br />It&#039;s so risky...&#160; <img src="http://dev1galaxy.org/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /> </p><p>Therefore, as root:</p><div class="codebox"><pre><code># dpkg --purge gnuinos-keyring
# rm -f /etc/apt/sources.list.d/gnuinos.list
# apt-get update</code></pre></div><p><ins>Colophon:</ins> the <strong>automatically connect</strong> option of simple-netaid is still a <span class="bbu">work in progress</span>.</p>]]></description>
			<author><![CDATA[dummy@example.com (aitor)]]></author>
			<pubDate>Thu, 28 Apr 2022 19:52:04 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=35789#p35789</guid>
		</item>
	</channel>
</rss>
