Added utilities for make random strings

This commit is contained in:
absurdo 2023-11-25 01:40:31 +01:00
parent 479040930c
commit 824999f165
2 changed files with 16 additions and 3 deletions

View file

@ -3,10 +3,15 @@
{
"type": "path",
"url": "./vendor/phangoapp/leviathanutils"
},
{
"type": "git",
"url": "https://bitbucket.org/phangoapp/phautils.git"
}
],
"require": {
"phangoapp/leviathanutils": "dev-master"
"phangoapp/leviathanutils": "dev-master",
"phangoapp/phautils": "dev-master"
}
}

View file

@ -82,13 +82,21 @@ class Linux {
}
static public function add_new_user() {
static public function add_new_user($user, $password='', $group='', $user_directory='', $shell='/usr/sbin/nologin') {
$str_user='sudo useradd -m -s ${shell} ${username}';
if($password!='') {
}
static public function delete_user() {
Linux::shell_command([$str_user]);
}
static public function delete_user($username) {
}