diff --git a/Linux/lazagne/config/homes.py b/Linux/lazagne/config/homes.py index d94d9746..67b18358 100644 --- a/Linux/lazagne/config/homes.py +++ b/Linux/lazagne/config/homes.py @@ -36,6 +36,24 @@ def get(file=[], dir=[]): if not files and not dirs and os.path.isdir(p): yield p +def users(file=[], dir=[]): + files = file if (type(file) in (tuple, list)) else [file] + dirs = dir if (type(dir) in (tuple, list)) else [dir] + + for pw in pwd.getpwall(): + if files: + for file in files: + if os.path.isfile(os.path.join(pw.pw_dir, file)): + yield pw.pw_name, os.path.join(pw.pw_dir, file) + + if dirs: + for dir in dirs: + if os.path.isdir(os.path.join(pw.pw_dir, dir)): + yield pw.pw_name, os.path.join(pw.pw_dir, dir) + + if not files and not dirs and os.path.isdir(pw.pw_dir): + yield pw.pw_name, pw.pw_dir + def sessions(setenv=True): visited = set() diff --git a/Linux/lazagne/config/manageModules.py b/Linux/lazagne/config/manageModules.py index 551eb683..454f1ff7 100755 --- a/Linux/lazagne/config/manageModules.py +++ b/Linux/lazagne/config/manageModules.py @@ -62,6 +62,7 @@ def get_modules(): Shadow(), Aws(), Docker(), + Ssh(), SQLDeveloper(), Squirrel(), Wifi(),