Setup an static IP on Arch Linux

Setup an static IP on Arch Linux can be done by placing a config file in /etc/netctl/: $> sudo nano eth0-Valhalla As you can see, you have to install sudo first. Otherwise you have to switch to root user (su). In the file you have to place the following lines for example: Description=’Valhalla at home eth0′ […]

Wifi setup on Arch Linux

The following steps are showing how I did setup my wireless connection with an static IP on my ArchLinux driven RaspberryPi. You need to have installed sudo to uses this instructions: Update all packages: $> sudo pacman -Syu Install dialog package: $> sudo pacman -S dialog Install wpa_supplicant package $> sudo pacman -S wpa_supplicant Run wifi-menu: […]

Download password protected file over shell

Therefore we use wget: wget -O outputfile.txt –user sheldon –ask-password https://ask-sheldon.com/genius-stuff.html # f.e. REST wget –http-user USER –http-password PASSWOR http://ask-sheldon.com/import.txt # HTACCESS protection If you let -O param out the output will be stored under its original name.

Get MAC address from file system

On Debian based Linux distributions you can get the MAC address of the respective network adapter from the filesystem like shown below: $> cat /sys/class/net/wlan0/address # WLAN adapter $> 81:82:83:4:85:86 $> cat /sys/class/net/eth0/address # LAN adapter $> 1a:1b:1c:1d:1e:1f As you can see, all adapters have their own folder under  /sys/class/net/ that contains  a address file with the corresponding MAC […]

Run multiple recoverabele sessions with screen

Sometime you nee to run a script or something like that on a remote host and you can’t be sure, that the remote session will preserve until the script has finished. Another case is mobile working. Sometimes you need the possibility to start a script on one place, send your disconnect the ssh client and open […]

Samba fileserver

All tricks round about samba fileserver goes here. Print Status: $> smbstatus -L Add User Steps to add a new samba user: add Linux-User(m creates a homedirs under /home/): $> useradd abrandt -d /home/abrandt -c “Annika Brandt” -G users -g users -m set Password: $> passwd abrandt set Samba-Password $> smbpasswd -a abrandt Samba reload […]

Linux – Add or edit DNS-server

In most Linux distribution the nameservers are stored in the file /etc/resolv.conf So you can edit it via: $> sudo nano /etc/resolv.conf You will see something like that: nameserver 192.168.88.1 nameserver 0.0.0.0 As you can see all nameserver entries follow the pattern: nameserver IPADRESS When searching for an DNS-Server the list is processed top down. […]

Create a SSH key with 1024 Bit encryption

To generate a 1024 Bit encrypted SSH key you can use the following command: $> ssh-keygen -b 1024 -t rsa Normally the key is saved in ~/.ssh/id_rsa together with the corresponding public key (~/.ssh/id_rsa.pub). Attention: Make sure you can remember the paraphrase later on if you entered one.