OS Helpers

Page content

here a small Collection of Helper and Scripts. You may find this stuff useful. Please be aware that you run this stuff on your own risk. It’s specially made for myself and you should not run this stuff as provided here. you may give me access to your system and you don’t want this ;)

add bash & wget

we need bash and wget for the following stuff. install it if not yet installed.

# OpenBSD
pkg_add bash-- wget--

# FreeBSD
pkg install -y bash wget

# Debian (other Distro not tested ...)
should be installed by default.
otherwise, use 'yum install bash wget', 'apt install bash wget' or 'yast ...'

hello world

let’s check if we can download and run a “hello world” script. you can check the script just without pipe it to “|sh”. if you think it’s fine, copy paste it and you will get a “hello world”

# check the script without running it !
wget -q -O - https://blog.stoege.net/scripts/oshelp/hello.sh

--- you get ---
$ wget -q -O - https://blog.stoege.net/scripts/oshelp/hello.sh
#!/usr/bin/env bash

echo "hello world"

exit 0
$
--- done ---

# run the script (because you pipe it through bash !)
wget -q -O - https://blog.stoege.net/scripts/oshelp/hello.sh |bash 

--- you get ---
$ wget -q -O - https://blog.stoege.net/scripts/oshelp/hello.sh |bash 
hello world
$ 
--- done ---

install doas.conf

… and give users in group “wheel” (for BSD) or group “root” (for Debian) fully root permission (you may don’t wanna do this …)

i don’t like sudo and always use doas. And i know, there was also a vulnerability in 2019 on Linux Platforms.

Anyhow, following some Helpers to install “doas” on your System and allow certain group members full permission without asking for a password. you may wanna adopt it for your needs.

wget -q -O - https://blog.stoege.net/scripts/oshelp/doas.sh |bash

more

more stuff will follow soon.

  • profiles
  • install users
  • install basic packages
  • install basic tools
  • configure git, vim, …

sha256: 64bdd4c7943a738f6e2cf299564e37d9cb6a750232e3b1162d652f24366ef792