Skip to content

Commit

Permalink
init push 2
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDoobPG authored and MrDoobPG committed Sep 11, 2019
1 parent 4d7b3f1 commit d07a393
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
40 changes: 40 additions & 0 deletions menu/alias/templates/ptsadd
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash
##usercheck
if [ $(grep "1000" /etc/passwd | cut -d: -f1 | awk '{print $1}') ]; then
usermod -aG sudo $(grep "1000" /etc/passwd | cut -d: -f1 | awk '{print $1}')
sudo usermod -s /bin/bash $(grep "1000" /etc/passwd | cut -d: -f1 | awk '{print $1}')
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo " ✅ PASSED ! We found the user UID " $(grep "1000" /etc/passwd | cut -d: -f1 | awk '{print $1}')
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
else
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo " ⌛ INFO ! "
echo " ⌛ INFO ! Only lowercase and dont empty parts"
echo " ⌛ INFO ! Enter a password (8+ chars)"
echo " ⌛ INFO ! "
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
read -p "Enter username : " username
read -s -p "Enter password : " password
echo ""
egrep "^$username" /etc/passwd >/dev/null
pass=$(perl -e 'print crypt($ARGV[0], "password")' $password)
useradd -m -p $pass $username
usermod -aG sudo $username
sudo usermod -s /bin/bash $username
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo " ✅ PASSED ! User has been added to system!"
echo " ✅ PASSED ! Your Username : " $username
echo " ✅ PASSED ! Your Password : " $password
echo " ✅ PASSED ! "
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
fi
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
😂 What a Lame name: $(grep "1000" /etc/passwd | cut -d: -f1 | awk '{print $1}')
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
exit 0
2 changes: 1 addition & 1 deletion menu/pgui/pgui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
image: 'mrdoob/dngele:latest'

# CORE (MANDATORY) ############################################################
- name: 'Including core job'
- name: 'Including cron job'
include_tasks: '/opt/coreapps/apps/_core.yml'

- name: 'Including cron job'
Expand Down

0 comments on commit d07a393

Please sign in to comment.