mirror of
https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git
synced 2025-12-15 11:22:43 +03:00
only lock root, not EC2_USER
This commit is contained in:
parent
a866c27e06
commit
e54b913fa4
@ -85,8 +85,12 @@ _resize_root_partition() {
|
||||
resize2fs "$mountpoint"
|
||||
}
|
||||
|
||||
_lock_root_user() {
|
||||
passwd -l root
|
||||
}
|
||||
|
||||
_disable_password() {
|
||||
passwd -l "$1"
|
||||
echo "$1:*" | chpasswd -e
|
||||
}
|
||||
|
||||
start() {
|
||||
@ -95,7 +99,7 @@ start() {
|
||||
|
||||
[ -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 "Expanding root partition"; _resize_root_partition; eend $?
|
||||
ebegin "Setting ec2 hostname"; _update_hostname; eend $?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user