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

Fabric 3.2.2 asks for sudo password when executing NOPASSWD command #2287

Closed
nmtitov opened this issue Nov 2, 2023 · 7 comments
Closed

Fabric 3.2.2 asks for sudo password when executing NOPASSWD command #2287

nmtitov opened this issue Nov 2, 2023 · 7 comments
Labels
Awaiting feedback Contributor needs to supply extra information Support

Comments

@nmtitov
Copy link

nmtitov commented Nov 2, 2023

I have configured sudoers to let me execute two commands without password:

# Allow foobar restart app_server
Cmnd_Alias RESTART = /home/foobar/restart_nginx, /home/foobar/bin/restart_app_server
foobar ALL = NOPASSWD : RESTART

When I ssh to the server I can execute both commands without password:

sudo /home/foobar/bin/restart_app_server
sudo /home/foobar/bin/restart_nginx

However when I do the same with Fabric I get the following error:

sudo /home/foobar/bin/restart_app_server
sudo /home/foobar/bin/timers_nginx
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required

This is what my fabfile looks like:

    conn = Connection(local_settings.FABRIC_HOST, port=local_settings.FABRIC_PORT)
    conn.run(
        f"sudo /home/foobar/bin/restart_app_server && "
        f"sudo /home/foobar/bin/timers_nginx", echo=True)

I tried shell=False, tried sudo(...) instead of run(...). No difference at all. This issue appeared after updating from Fabric 2.x.x to Fabric 3.x.x. But I can use old Fabric 2.x.x. right now.

Thanks!

@davidjmemmett
Copy link
Contributor

Hi,

Could you please fill out the issue template? It's impossible to diagnose an issue without any details.

@davidjmemmett davidjmemmett added the Awaiting feedback Contributor needs to supply extra information label Sep 28, 2024
@nmtitov
Copy link
Author

nmtitov commented Sep 28, 2024

Hi,

Could you please fill out the issue template? It's impossible to diagnose an issue without any details.

Without any details? You are kidding?

@davidjmemmett
Copy link
Contributor

It leaves a lot to be desired. Can you be precise about the setup & what users are being used etc?

@nmtitov
Copy link
Author

nmtitov commented Sep 28, 2024

From your empty Github profile history I see that you actually gotta be trolling. I hope you are trolling.

@davidjmemmett
Copy link
Contributor

I'll give you a chance to apologise.

@davidjmemmett
Copy link
Contributor

@nmtitov I see that you aren't willing to engage constructively, therefore I'm going to close this issue. If you would like to report an issue, please fill out the issue template and please provide as much relevant information as you can.

For future reference: we're all volunteers, we don't get paid to help with these projects. I hope you can adjust your expectations and your manners accordingly.

@nmtitov
Copy link
Author

nmtitov commented Sep 29, 2024

@davidjmemmett 🤡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting feedback Contributor needs to supply extra information Support
Projects
None yet
Development

No branches or pull requests

2 participants