diff --git a/docs/admin.md b/docs/admin.md index 027bec7..dd7b905 100644 --- a/docs/admin.md +++ b/docs/admin.md @@ -7,6 +7,9 @@ Please do **not** use the standard Linux commands (e.g., `useradd`, `adduser`, . The script is interactive and allows to add, remove, and edit users. Please run `sudo userctl --help` for more information. +Users on this server are identified by their university email address. +Thus, `userctl` expects the full email address as argument. + ## Process Management Some users may forget to stop their processes or block all GPUs at once. diff --git a/modules/userctl.py b/modules/userctl.py index a4cfe9c..7e979c9 100644 --- a/modules/userctl.py +++ b/modules/userctl.py @@ -25,7 +25,9 @@ def run_cmd(cmd: Sequence[str], **kwargs) -> str: def check_email(user: str): if not user.endswith("@uni-trier.de"): - raise typer.BadParameter("Only university mail addresses are allowed") + raise typer.BadParameter( + "Please provide the university email address, the script determines the username automatically" + ) return user.split("@")[0]