Fixes in add user
This commit is contained in:
parent
70e0858dc9
commit
b803bfb7b4
1 changed files with 3 additions and 1 deletions
|
|
@ -93,7 +93,7 @@ class Linux {
|
||||||
|
|
||||||
static public function add_new_user($username, $password='', $user_directory='', $shell='/usr/sbin/nologin') {
|
static public function add_new_user($username, $password='', $user_directory='', $shell='/usr/sbin/nologin') {
|
||||||
|
|
||||||
$str_user="sudo useradd -m -s ${shell} ${username}";
|
$str_user="sudo useradd -m -s ${shell}";
|
||||||
|
|
||||||
if($password!='') {
|
if($password!='') {
|
||||||
|
|
||||||
|
|
@ -113,6 +113,8 @@ class Linux {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$str_user.=" ${username}";
|
||||||
|
|
||||||
Linux::shell_command([$str_user]);
|
Linux::shell_command([$str_user]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue