From c915bff32eecbd29bc49275aaeeeeddecde1dc99 Mon Sep 17 00:00:00 2001 From: dpeca Date: Tue, 24 Mar 2020 20:40:47 +0100 Subject: [PATCH] Forbid changing root password --- bin/v-change-user-password | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/v-change-user-password b/bin/v-change-user-password index 22a3d78f6..a1b6a76fb 100755 --- a/bin/v-change-user-password +++ b/bin/v-change-user-password @@ -22,6 +22,9 @@ source $VESTA/conf/vesta.conf # Verifications # #----------------------------------------------------------# +if [ "$user" = "root" ]; then + check_result $E_FORBIDEN "Changing root password is forbiden" +fi check_args '2' "$#" 'USER PASSWORD' is_format_valid 'user' is_object_valid 'user' 'USER' "$user"