#!/bin/sh PWD=`pwd` DATE=`date +%Y%m%d` ARCH=`uname -p` RELEASE=`cat /etc/redhat-release | awk '{ print $3 }'` # ****************************** # Add the admin Group and local Users - if not already there. # Set passwd to "Passw0rd" with a Zero # ****************************** if [ -d /home/jradtke ] then echo "mv /home/jradtke /home/jradtke.${DATE} " mv /home/jradtke /home/jradtke.${DATE} fi getent group admin >/dev/null || groupadd -g 6969 admin getent group jradtke >/dev/null || groupadd -g 2025 jradtke getent passwd jradtke >/dev/null || useradd -g 2025 -u 2025 -G admin -s /bin/bash -c "James Radtke" -d /home/jradtke -p '<encr passwd here>' jradtke # UPDATE THE SUDOERS FILE cat << EOF >> /etc/sudoers ## ALIASES Host_Alias CRASHHOSTS = neo,neo.matrix.private,cypher User_Alias CRASHUSERS = jradtke Cmnd_Alias CRASHCMNDS = /usr/bin/systemctl restart ntpd.ser...
Linux: The whole world made it for you... This blog is a collection of things I come across either at home or at work as a Linux Administrator. I have worked as an Admin working with Solaris, SAN, Backups and Linux at the Enterprise level for over 16 years.