diff options
author | Mike Crute <mike@crute.us> | 2018-08-19 13:17:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-19 13:17:42 -0700 |
commit | 959968fa54455ca71276d5cef1308d61517576b4 (patch) | |
tree | 99076cebbf3b73c78b5d45e4a33cfea31a540707 /tiny-ec2-bootstrap | |
parent | 95f7fc2b48177a8a673d5e3dbe016c642a465ded (diff) | |
parent | eaef72fef992e008b854f6a50d40f37c19688fb5 (diff) | |
download | tiny-ec2-bootstrap-959968fa54455ca71276d5cef1308d61517576b4.tar.bz2 tiny-ec2-bootstrap-959968fa54455ca71276d5cef1308d61517576b4.tar.xz tiny-ec2-bootstrap-959968fa54455ca71276d5cef1308d61517576b4.zip |
Merge pull request #2 from tomalok/masterrelease-1.2.0
Disable root/alpine passwords instead scrambling them
Diffstat (limited to 'tiny-ec2-bootstrap')
-rw-r--r-- | tiny-ec2-bootstrap | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tiny-ec2-bootstrap b/tiny-ec2-bootstrap index 84f7af2..c03fcd3 100644 --- a/tiny-ec2-bootstrap +++ b/tiny-ec2-bootstrap | |||
@@ -56,8 +56,8 @@ _resize_root_partition() { | |||
56 | resize2fs $(mountpoint -n / | cut -d' ' -f1) | 56 | resize2fs $(mountpoint -n / | cut -d' ' -f1) |
57 | } | 57 | } |
58 | 58 | ||
59 | _scramble_password() { | 59 | _disable_password() { |
60 | echo "$1:$(head -c 100 /dev/urandom | sha512sum | cut -d' ' -f1)" | chpasswd | 60 | echo "$1:*" | chpasswd -e |
61 | } | 61 | } |
62 | 62 | ||
63 | start() { | 63 | start() { |
@@ -66,8 +66,8 @@ start() { | |||
66 | 66 | ||
67 | [ -d "/var/lib/cloud" ] || mkdir -p /var/lib/cloud | 67 | [ -d "/var/lib/cloud" ] || mkdir -p /var/lib/cloud |
68 | 68 | ||
69 | ebegin "Scrambling root password"; _scramble_password root; eend $? | 69 | ebegin "Disabling root password"; _disable_password root; eend $? |
70 | ebegin "Scrambling alpine password"; _scramble_password alpine; eend $? | 70 | ebegin "Disabling alpine password"; _disable_password alpine; eend $? |
71 | ebegin "Resizing root partition"; _resize_root_partition; eend $? | 71 | ebegin "Resizing root partition"; _resize_root_partition; eend $? |
72 | ebegin "Setting ec2 hostname"; _update_hostname; eend $? | 72 | ebegin "Setting ec2 hostname"; _update_hostname; eend $? |
73 | ebegin "Setting ec2 user ssh keys"; _set_ssh_keys "alpine"; eend $? | 73 | ebegin "Setting ec2 user ssh keys"; _set_ssh_keys "alpine"; eend $? |