Explorar el Código

Forbid changing root password

dpeca hace 6 años
padre
commit
c915bff32e
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      bin/v-change-user-password

+ 3 - 0
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"