aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rw-r--r--tiny-ec2-bootstrap8
2 files changed, 6 insertions, 5 deletions
diff --git a/README.md b/README.md
index d4fc869..1e6e655 100644
--- a/README.md
+++ b/README.md
@@ -14,6 +14,7 @@ built-in. The only required dependencies are:
14 14
15- bash-like shell (e.g. bash, dash, ash) 15- bash-like shell (e.g. bash, dash, ash)
16- wget 16- wget
17- resize2fs
17 18
18## Supported Features and Environments 19## Supported Features and Environments
19 20
@@ -31,7 +32,7 @@ those things. Instead it supports:
31- setting system hostname 32- setting system hostname
32- install user's configured SSH keys to the alpine user's authorized_keys file 33- install user's configured SSH keys to the alpine user's authorized_keys file
33- run any script-like user data (must start with #!) 34- run any script-like user data (must start with #!)
34- scramble root and alpine password 35- disable root and alpine password
35- resize root partition to available disk space 36- resize root partition to available disk space
36 37
37These steps only run once. After the initial bootstrap the bootstrapper script 38These steps only run once. After the initial bootstrap the bootstrapper script
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
63start() { 63start() {
@@ -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 $?