mirror of
https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git
synced 2025-12-15 11:22:43 +03:00
Merge pull request #21 from mcrute/fix/do-not-lock-EC2_USER
only lock root, not EC2_USER
This commit is contained in:
commit
60233942e2
@ -85,8 +85,12 @@ _resize_root_partition() {
|
|||||||
resize2fs "$mountpoint"
|
resize2fs "$mountpoint"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_lock_root_user() {
|
||||||
|
passwd -l root
|
||||||
|
}
|
||||||
|
|
||||||
_disable_password() {
|
_disable_password() {
|
||||||
passwd -l "$1"
|
echo "$1:*" | chpasswd -e
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
@ -95,7 +99,7 @@ start() {
|
|||||||
|
|
||||||
[ -d "/var/lib/cloud" ] || mkdir -p /var/lib/cloud
|
[ -d "/var/lib/cloud" ] || mkdir -p /var/lib/cloud
|
||||||
|
|
||||||
ebegin "Disabling root password"; _disable_password root; eend $?
|
ebegin "Locking root account"; _lock_root_account; eend $?
|
||||||
ebegin "Disabling $EC2_USER password"; _disable_password "$EC2_USER"; eend $?
|
ebegin "Disabling $EC2_USER password"; _disable_password "$EC2_USER"; eend $?
|
||||||
ebegin "Expanding root partition"; _resize_root_partition; eend $?
|
ebegin "Expanding root partition"; _resize_root_partition; eend $?
|
||||||
ebegin "Setting ec2 hostname"; _update_hostname; eend $?
|
ebegin "Setting ec2 hostname"; _update_hostname; eend $?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user