Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 205: The user does not have permission to use sudo, but user in the sudo group. #876

Open
mekbectv opened this issue Jul 1, 2024 · 9 comments

Comments

@mekbectv
Copy link

mekbectv commented Jul 1, 2024

Describe the bug
Error 205 (The user does not have permission to use sudo), but user in the sudo group.

To Reproduce
Steps to reproduce the behavior:

  1. adduser amnezia
  2. user -aG sudo amnezia
  3. Set up server, or connect as admin.
  4. See error 205

Devices:

  • OS: Windows 11 & Android 13, server on Debian 12
  • Version: 4.5.3.0 (Latest)

Logs

All data is correct and the SSH connection is stable (As well as the work of sudo), please fix the bug due to the fact that many servers have ROOT disabled and if you enable it, security vulnerabilities will arise.

@pokamest
Copy link
Member

pokamest commented Jul 9, 2024

Does user amnezia asks for password when you use sudo ?

@dudarenko-io
Copy link

dudarenko-io commented Jul 10, 2024

Hi, I'm trying to use amnezia for very first time. Have the same issue. On my server I'm able to use sudo under amnezia user without password prompt
User settings looks like this:

amnezia         ALL=(ALL)       NOPASSWD: ALL
%wheel  ALL=(ALL)       NOPASSWD: ALL
uid=1001(amnezia) gid=1001(amnezia) groups=1001(amnezia),10(wheel)

@dudarenko-io
Copy link

As far as i can see, this code expects the user to be in 'sudo' group. But there are several RHEL based distros in which sudo privileges are granted via 'wheel' group.
My server is an ec2 instance with amazon linux

@dudarenko-io
Copy link

I changed distro to Ubuntu and now i have amnezia client passing this sudo check

@pokamest
Copy link
Member

Thank you for the information, it will be helpful for users.
@mekbectv Did you solve the issue?

@mekbectv
Copy link
Author

Does user amnezia asks for password when you use sudo ?

Yes

@mekbectv
Copy link
Author

Thank you for the information, it will be helpful for users. @mekbectv Did you solve the issue?

No, the only option is to allow root login.

@karmicdude
Copy link

karmicdude commented Jul 27, 2024

The same issue.
amnezia user is added to the sudoers config with NOPASSWD. This of course works, I checked from the user himself - any commands are executed with sudo with no issues.
But when I try to install server I get the same error

The user does not have permission to use sudo

sftp subsystem also enabled.

AWS AMI ami-07d20571c32ba6cdc - Ubuntu 22.04 LTS from community (ubuntu-jammy-22.04-amd64-server-20240701)

@karmicdude
Copy link

karmicdude commented Jul 27, 2024

OK, I think I've figured out how to fix it, but I haven't yet understood the cause of this behaviour. I'll find out later.

In general, if you add the configuration for the amnezia user to the directory that is included in the main config (@includedir /etc/sudoers.d), everything works.

I.e. I moved the line from /etc/sudoers

amnezia ALL=(ALL) NOPASSWD:ALL

to /etc/sudoers.d/90-amnezia-user

And everything magically worked.

I checked a couple of times putting the line back in. It stops working. Something that I don't understand, I wonder. Anyway, I'll have a look later to find out the cause. But it can be "fixed" the way I described above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants