This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This Script sets a random root password, disables the root user and deletes itself afterwards! | |
# Put this Script in the "/etc/rc5.d/" directory. | |
# | |
# Version: 1.0 | |
# Author: ham5ter@ham5ter.de | |
# Date 02.08.2016 | |
genpasswd() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This Script Regenerates the OpenSSH Host Keys, and deletes itself afterwards! | |
# Put this Script in the "/etc/rc5.d/" directory. | |
# | |
# Version: 1.1 | |
# Author: ham5ter@ham5ter.de | |
# Date 02.08.2016 | |
# SPDX-License-Identifier: MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
# | |
# This script is used to Create a User Account with SUDO Privileges!!!, | |
# Display the Password and force the User to change that Password upon the first Login! | |
# | |
# Version: 1.0 | |
# Author: ham5ter@ham5ter.de | |
# Date: 02.08.2016 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dont just copy and paste it! | |
# i am not responsible for any dataloss or other damage! | |
### grow the Disk in vSphere ### | |
# Just do it, there is no way to Script that | |
### rescan all SCSI Devices to detect the Change ### | |
for scsi in /sys/class/scsi_device/*/device/rescan; do | |
echo 1 > $scsi | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clean up Package Management | |
apt-get -y remove linux-headers-$(uname -r) build-essential | |
apt-get -y autoremove | |
apt-get -y clean | |
# Removing DHCP leases | |
echo "cleaning up dhcp leases" | |
rm /var/lib/dhcp/* | |
# Make sure Udev doesn't block our network |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Zero out all the remaining Space of a Virtual Machines Filesystem for Image Creation | |
dd if=/dev/zero of=/EMPTY bs=1M | |
sync | |
rm -f /EMPTY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt-get update | |
apt-get install wget -y | |
wget -O - https://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest/SALTSTACK-GPG-KEY.pub | sudo apt-key add - | |
echo "deb http://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest trusty main" > /etc/apt/sources.list.d/saltstack.list | |
apt-get update | |
apt-get install salt-minion -y | |
cat << EOF > /etc/salt/minion | |
master: $1 | |
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This sets the variable "SCRIPT_DIRECTORY" to the Path, the Script is in. | |
SCRIPT_DIRECTORY="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example of job definition: | |
# .---------------- minute (0 - 59) | |
# | .------------- hour (0 - 23) | |
# | | .---------- day of month (1 - 31) | |
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ... | |
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat | |
# | | | | | | |
# * * * * * user-name command to be executed | |
# | |
# Aliases: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# run with root privileges | |
# basic salt-master installation on Ubuntu 16.04 | |
apt-get update | |
apt-get install wget -y | |
wget -O - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest/SALTSTACK-GPG-KEY.pub | sudo apt-key add - | |
echo "deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest xenial main" > /etc/apt/sources.list.d/saltstack.list | |
apt-get update |