WTF?
I have always hated bloated software, I have never been happy with any TUI
(Text-based User Interface) tool for ethernet and wi-fi network configuration
under GNU/Linux --let alone GUIs for network configuration-- and I have always
ended up using a mixture of small shell scripts, simple (yet repetitive)
commands, and a lot of swearing around.
So I decided to give it a try, and put together a simple tool for network
configuration. The result is setnet, a 1300 SLOC shell script with a dialog
UI to configure ethernet and wifi connections. At the moment, setnet is able
to configure:
Moreover, setnet can be used for simple network diagnosis tasks, e.g., ping, DNS queries, printout of ARP and routing tables, etc.
setnet is meant to be a POSIX-compliant shell script, and has been tested with bash, busybox, dash, ksh, mksh, posh, yash, and zsh. It should still be considered beta software, so please use it AT YOUR OWN RISK.
Downloads
The current stable version is setnet.sh 0.4 (20180503).
Clone the latets sources from: https://git.katolaz.net/setnet
or get the deb package:
$ ./setnet.sh -h Usage: setnet.sh [OPTION] Options: -c cfg_file Load configuration from cfg_file. -d trace_file Set debugging mode and dump all dialog traces to trace_file -v Print version number and exit. -h Show this help. $
If the argument "-c" is specified, setnet will use the provided
configuration file. Otherwise, it will look for its configuration file
in one of the following locations:
- /etc/setnetrc - ~/.setnetrc
Be careful:
allowing a regular user to act as root (using either sudo, or sup,
or any other wizardry) is a potential security threat for your system.
Do it at your own risk, and don't complain if anything goes wrong.
In particular, the current version of setnet has not been thoroughly
tested against potential privilege escalation attacks.
There are at least two concrete possibilities to allow a regular user (in the following we call such user "fool") to configure network interfaces using setnet.
fool ALL=NOPASSWD: /usr/sbin/setnet.shto the file /etc/sudoers, and the user "fool" will be able to run setnet.sh with effective UID 0 (i.e., as if it was root), by using the command:
[fool@host]$ sudo /usr/sbin/setnet.shand thus will be able to perform all the needed admin tasks to configure networking.
{1000, -1, "setnet.sh", "/usr/sbin/setnet.sh", ""};to your config.h before recompiling sup.
Comments, suggestions, criticisms, and bug reports are welcome, and should be reported
on the gitlab page of the project:
(update 01/01/2021) Well, it looks like the page above does not exist any more. So if you have
any comment, suggestion, criticism, or bug report, just send it to me via email.
setnet is also available on GitHub:
If you really want to contact me by email, the address to use is katolaz at freaknet dot org dot REMOVE dot DOTS.
HH
KatolaZ
DISCLAIMER: ALL THE SOFTWARE AVAILABLE FOR DOWNLOAD ON THIS PAGE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.