Skip to content
Permalink
Browse files

Allow nemsadmin password login

  • Loading branch information...
NEMS Linux
NEMS Linux committed Aug 24, 2019
1 parent 36d435f commit a41c3b8a6938eb012ccb060424919e02f244e2a8
Showing with 10 additions and 0 deletions.
  1. +10 −0 platforms/aws/nemsadmin-pw.sh
@@ -0,0 +1,10 @@
#!/bin/bash

# AWS removes the nemsadmin password when the AMI is deployed. Reverse this action.

if [ -d /home/nemsadmin ]; then # the nemsadmin user folder exists
usercount=$(find /home/* -maxdepth 0 -type d | wc -l)
if (( $usercount == 1)); then # Only do this if there are no other users on the system
echo -e "nemsadmin\nnemsadmin" | passwd nemsadmin >/tmp/init 2>&1
fi
fi

0 comments on commit a41c3b8

Please sign in to comment.
You can’t perform that action at this time.