Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Loading status checks…
initial commit of scripts
mchyzer
committed
May 28, 2020
1 parent
e1f1d4e
commit 4a1fb27
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
# Who am i? | ||
MY_IP=$(curl icanhazip.com) | ||
|
||
# Generate a password | ||
PASS=$(od -An -N32 -i /dev/random | md5sum | cut -c1-8) | ||
#ENCRYPTED_PASS=$(perl -e 'print crypt($ARGV[0], "password")' $PASS) | ||
|
||
groupadd -g 1002 student | ||
|
||
# Make the student account | ||
#useradd -u 1002 -g 1002 -m -p $ENCRYPTED_PASS student | ||
|
||
useradd -u 1002 -g 1002 -m student | ||
echo "student:$PASS" | chpasswd | ||
|
||
# Add the student account to docker group. | ||
usermod -aG docker student | ||
|
||
# Student uses sudo to become root. | ||
#usermod -aG wheel student | ||
|
||
# Echo the password | ||
echo "$MY_IP, student, $PASS" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
yum -y update | ||
/root/mkstudent.sh | ||
usermod -G wheel,docker student | ||
docker pull rabbitmq:management | ||
/home/student/start-rabbitmq.sh |