Skip to content

Commit

Permalink
Don't create admin user
Browse files Browse the repository at this point in the history
  • Loading branch information
NEMS Linux committed Aug 24, 2019
1 parent a3f5563 commit dfa5b30
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
8 changes: 6 additions & 2 deletions build/030-user
Expand Up @@ -21,15 +21,19 @@ platform=$(/usr/local/bin/nems-info platform)


# Amazon Web Services uses a key pair instead of password
#if (( $platform == 22 )); then
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
#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
Expand Down
9 changes: 9 additions & 0 deletions notes/aws/aws.md
@@ -0,0 +1,9 @@
When creating the instance, add this to the user data field:

#cloud-config
system_info:
default_user:
name: nemsadmin


Boot once, then clean, shut down and create the AMI.

0 comments on commit dfa5b30

Please sign in to comment.