Category: Bash / Terminal / Scripts


yum install ascii # or apt install ascii ascii Usage: ascii [-dxohv] [-t] [char-alias…] -t = one-line output -d = Decimal table -o = octal table -x = hex table -h = This help screen -v = version information Prints […]


update: safety first! when it comes to important files: safety comes first thus recommend to the user that wants to go pro the following backup system: have two complete backups at two different places: backupA: at the company, USB 3.0 […]


WARNING! BE VERY VERY CAREFUL! YOU CAN DESTROY YOUR SYSTEM! so better use a system that is not production important/not a live server. use a laptop that has NOTHING ATTACHED TO IT! (unplug all USB Sticks and external USB Drives) […]


will do exactly that: last -F # -F Print full login and logout times and dates. # output will look like this # username (who logged in) ip (from which was logged in) duration of session username pts/0 Tue […]

linux bash – show all crontabs of all users

cat /scripts/ for user in $(cut -f1 -d: /etc/passwd); do echo $user; crontab -u $user -l; done outputs a nice list like this: in format: user command root no crontab for root actualuser * * * * * echo “stuff” […]

linux bash arrays example

arrays are pretty useful variables that hold key:value data pairs, per default the “key” is an integer number, BUT: as shown there can also be associative arrays, meaning the index can be any string (needs bash version4) this script demonstrates […]

self hosted wordpress setup script

WARNING! BACKUP YOUR MACHINE! UNTESTED! before running this script change to your new web root: /home/UserName/web/ then run it like /scripts/ it tries to: download and unpack the latest wordpress into the current directory disable xmlrpc.php disable wp-cron.php requirements: a […]

linux bash script – test if host is alive – internet connection test script – uptime test script

tested with: tested with/on: Static hostname: CentOS1.localdomain Operating System: CentOS Linux 7 (Core) Kernel: Linux 4.15.9 Architecture: x86-64 bash -version GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu) ping -V ping utility, iputils-s20160308 usage: /scripts/ cat /scripts/ #!/bin/bash # ping -c […]


i want to create a autostart script that starts whenever the server starts. mkdir /scripts vim /scripts/ #!/bin/bash echo “========= starting up docker service” systemctl start docker echo “========= starting up docker containers” docker start containername vim /scripts/ #!/bin/bash echo […]

Samba4 on CentOS7 in under 10min – add windows file sharing user script – security – from SMB 1.0 to 2.0 – anti ETERNALBLUE EXPLOIT update trouble – SID “username” is not in a valid format – pdb_getsampwnam (tdb) error fetching database – solved

update: 2019-02: everything was fine… until you decided to update because of the EthernalBlue exploit THAT ALSO AFFECTS OPEN SOURCE IMPLEMENTATIONS OF SMB 1.0! (WTF!? WHY?), samba now miss behaves on Debian and CentOS. (scroll down for details) EternalBlue, sometimes […]