[GH-ISSUE #1133] The installer script may not work if user has sudo privileges given with a different user group other than "sudo" #396

Closed
opened 2026-10-13 20:20:43 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @be195 on GitHub (Oct 8, 2024).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/1133

Describe the bug
The installer script checks sudo privileges based on the groups given to the user (the group in question named sudo). This may conflict if the sudo group in question is named something else (e.g. wheel).

To Reproduce
The steps to reproduce this problem are hypothetical and are made based on previous experience.

Steps to reproduce the behavior on Arch Linux:

  1. Install sudo package on the server.
  2. Using one of the example entries add sudo privileges to the wheel group.
  3. Create wheel group.
  4. Create a user and assign it to wheel.
  5. Try to install any VPN server with Amnezia client using the said server and user.
  6. See error.

Expected behavior
The installer script should work just fine even if the group that is used to give sudo privileges is named wheel.

Server

  • OS: any Linux distribution

Additional context
github.com/amnezia-vpn/amnezia-client@d4fff4af3c/client/core/controllers/serverController.cpp (L768-L772)

github.com/amnezia-vpn/amnezia-client@d4fff4af3c/client/server_scripts/check_user_in_sudo.sh (L1-L2)

This problem can be fixed using sudo -v or sudo -l in favor of checking user groups.

Originally created by @be195 on GitHub (Oct 8, 2024). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/1133 **Describe the bug** The installer script checks sudo privileges based on the groups given to the user (the group in question named `sudo`). This may conflict if the sudo group in question is named something else (e.g. `wheel`). **To Reproduce** The steps to reproduce this problem are hypothetical and are made based on previous experience. Steps to reproduce the behavior on Arch Linux: 1. Install `sudo` package on the server. 2. [Using one of the example entries add sudo privileges to the `wheel` group.](https://wiki.archlinux.org/title/Sudo#Example_entries) 3. Create `wheel` group. 4. Create a user and assign it to `wheel`. 5. Try to install any VPN server with Amnezia client using the said server and user. 6. See error. **Expected behavior** The installer script should work just fine even if the group that is used to give sudo privileges is named `wheel`. **Server** - OS: any Linux distribution **Additional context** https://github.com/amnezia-vpn/amnezia-client/blob/d4fff4af3cf836cc021c68f35779759c9152a96f/client/core/controllers/serverController.cpp#L768-L772 https://github.com/amnezia-vpn/amnezia-client/blob/d4fff4af3cf836cc021c68f35779759c9152a96f/client/server_scripts/check_user_in_sudo.sh#L1-L2 This problem can be fixed using `sudo -v` or `sudo -l` in favor of checking user groups.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#396
No description provided.