This file contains hidden or 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 shell script is moving uids and gids to new server without grabbing the system accounts | |
| #The one caveat with this script is confirming the UID start limit and upper limit for your distro | |
| #This can be confirmed by checking the /etc/libuser.conf it is denoted there in RHEL distros | |
| #This script is to be ran from the /tmp directory as denoted in BASE | |
| #This script is valid for 6.5 RHEL and down as is. Change UGIDLIMIT to 1000 for v7.0 | |
| #Create directory for migration files | |
| BASE=/tmp | |
| if [ -d ${BASE}/move ] |
This file contains hidden or 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
| # Bash Script for setting up tftpd-hpa for cisco devices | |
| # Run As Root | |
| # Check if root | |
| if [ "$(whoami)" != "root" ]; then | |
| echo "Not running as root. Exiting..." | |
| exit 0 | |
| else | |
| echo "Running as root. Good" | |
| fi |
This file contains hidden or 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 | |
| #For checking disk space on our servers | |
| #Clear Yesterday's Log | |
| #Checking for root brought to you by Brad Arnold | |
| if [ "$(whoami)" != "root" ]; then | |
| echo "Not running as root. Exiting..." | |
| echo "Please use sudo -s then run this script again as root." |
NewerOlder