Skip to content
Permalink
Browse files

Continue configuring user defaults

  • Loading branch information...
NEMS Linux
NEMS Linux committed Aug 24, 2019
1 parent dfa5b30 commit ae1dff0d40721023565808ae57c9c28d1863d40f
Showing with 3 additions and 16 deletions.
  1. +0 −16 build/030-user
  2. +3 −0 build/160-aws
@@ -19,22 +19,6 @@ platform=$(/usr/local/bin/nems-info platform)
wget -O license.txt https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
cp /root/nems/nems-migrator/data/nems/changelog.txt .


# Amazon Web Services uses a key pair instead of password
if (( $platform == 22 )); then
# if [[ -e /home/admin/.ssh/authorized_keys ]]; then
# if [[ ! -e /home/nemsadmin/.ssh ]]; then
# mkdir /home/nemsadmin/.ssh
# fi
# cp /home/admin/.ssh/authorized_keys /home/nemsadmin/.ssh/
# chown nemsadmin:nemsadmin /home/nemsadmin/.ssh/authorized_keys
# fi
echo "#cloud-config
system_info:
default_user:
name: nemsadmin" > /etc/cloud/cloud.cfg.d/defaults.cfg
fi

# Delete any default users and remove their home folders
userdel -f -r baldnerd # Bald Nerd's Base Images
userdel -f -r pi
@@ -27,4 +27,7 @@ if (( $platform == 22 )); then
/bin/systemctl start rc-local.service
fi

# Change default user to nemsadmin
cp -f /root/nems/nems-migrator/data/1.5/platforms/aws/cloud.cfg /etc/cloud/

fi

0 comments on commit ae1dff0

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