From 09d8ee1b8e4f94fe959d6e29a9a98955b792c125 Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Sat, 7 Jan 2023 09:27:16 -0500 Subject: [PATCH] ssh: Add sudo to allowed groups This is to allow vagrant user to login, as well as a normal sudo user that was created before installing FreedomBox. For most FreedomBoxes, the sudo group is empty, so it will have no impact. I do not update the existing file. But if someone needs this update, they can disable and then re-enable the restrict option. Signed-off-by: James Valleroy Reviewed-by: Sunil Mohan Adapa --- plinth/modules/ssh/privileged.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plinth/modules/ssh/privileged.py b/plinth/modules/ssh/privileged.py index 5d7cf1ed1..eb34fd559 100644 --- a/plinth/modules/ssh/privileged.py +++ b/plinth/modules/ssh/privileged.py @@ -58,11 +58,11 @@ def setup(): @privileged def restrict_users(should_restrict: bool): - """Restrict SSH logins to groups root, admin and freedombox-ssh.""" + """Restrict SSH logins to groups root, sudo, admin and freedombox-ssh.""" if not should_restrict: config_file.unlink(missing_ok=True) else: - config_file.write_text('AllowGroups root admin freedombox-ssh\n', + config_file.write_text('AllowGroups root sudo admin freedombox-ssh\n', encoding='utf-8') action_utils.service_reload('sshd')