From 8e7b37064706b39d007f7e9e12803b8353121b41 Mon Sep 17 00:00:00 2001 From: absurdo Date: Sat, 25 Nov 2023 11:14:29 +0100 Subject: [PATCH] Fixes in add user --- vendor/phangoapp/leviathanutils/src/Linux.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/phangoapp/leviathanutils/src/Linux.php b/vendor/phangoapp/leviathanutils/src/Linux.php index 69e2d85..aa1c950 100644 --- a/vendor/phangoapp/leviathanutils/src/Linux.php +++ b/vendor/phangoapp/leviathanutils/src/Linux.php @@ -93,11 +93,11 @@ class Linux { static public function add_new_user($user, $password='', $user_directory='', $shell='/usr/sbin/nologin') { - $str_user='sudo useradd -m -s ${shell} ${username}'; + $str_user="sudo useradd -m -s ${shell} ${username}"; if($password!='') { - $hash=crypt($password, '$6$rounds=6000$'.PhangoApp\PhaUtils\Utils\generate_random_password(15).'$'); + $hash=crypt($password, '$6$rounds=6000$'.PhangoApp\PhaUtils\Utils\generate_random_password(10).'$'); $str_user.=" -p \"${hash}\"";