Fixes in add user
This commit is contained in:
parent
37682ffee5
commit
8e7b370647
1 changed files with 2 additions and 2 deletions
|
|
@ -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}\"";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue