From 60de5a979142c16743b7a0cc6d01986822c9cd45 Mon Sep 17 00:00:00 2001 From: Dmitry Maksyoma Date: Wed, 6 Jul 2022 01:35:23 +1200 Subject: [PATCH 1/2] Add instructions to add a KasmVNC user to README --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 2ba5c4a..440135e 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,9 @@ sudo ln -s /usr/share/doc/kasmvncserver/examples/kasmvncserver-easy-start /usr/b sudo addgroup $USER ssl-cert # You will need to re-connect in order to pick up the group change +# Create a KasmVNC user able to use keyboard and mouse: +vncpasswd -u $USER -w + # Create ~/.vnc directory and corresponding files. kasmvncserver-easy-start -d && kasmvncserver-easy-start -kill From 1c54f4f921db6a9a4b158d1deafa0ede446e12b8 Mon Sep 17 00:00:00 2001 From: Dmitry Maksyoma Date: Wed, 6 Jul 2022 01:56:32 +1200 Subject: [PATCH 2/2] Improve prompts to create a user --- unix/kasmvncpasswd/kasmvncpasswd.c | 5 +++-- unix/vncserver | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/unix/kasmvncpasswd/kasmvncpasswd.c b/unix/kasmvncpasswd/kasmvncpasswd.c index 2a7224c..778c321 100644 --- a/unix/kasmvncpasswd/kasmvncpasswd.c +++ b/unix/kasmvncpasswd/kasmvncpasswd.c @@ -33,14 +33,15 @@ static void usage(const char *prog) { - fprintf(stderr, "Usage: %s -u username [-wnod] [file]\n" + fprintf(stderr, "Usage: %s -u username [-wnod] [password_file]\n" "-r Read permission\n" "-w Write permission\n" "-o Owner\n" "-n Don't change password, change permissions only\n" "-d Delete this user\n" "\n" - "The file is updated atomically.\n\n" + "The password file is updated atomically.\n" + "For more information, run \"man vncpasswd\".\n\n" "To pass the password via a pipe, use\n" "echo -e \"password\\npassword\\n\" | %s [-args]\n", prog, prog); diff --git a/unix/vncserver b/unix/vncserver index 68b4ad9..c6e6d86 100644 --- a/unix/vncserver +++ b/unix/vncserver @@ -281,7 +281,7 @@ $kasmAuthEnabled = 1; if ($kasmAuthEnabled) { if (!(-e "$ENV{HOME}/.kasmpasswd")) { - warn "\nYou will require a password to access your desktops.\n\n"; + warn "\nYou need to create a KasmVNC user to access your desktops.\n\n"; system($exedir."kasmvncpasswd $ENV{HOME}/.kasmpasswd"); if (($? >> 8) != 0) { exit 1;