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

Remove whoami check in "as" #167

Closed
smw1218 opened this issue Jul 29, 2014 · 3 comments
Closed

Remove whoami check in "as" #167

smw1218 opened this issue Jul 29, 2014 · 3 comments

Comments

@smw1218
Copy link

smw1218 commented Jul 29, 2014

For a restricted user (ie. a user that doesn't have full root access via sudo), this requires that "whoami" is explicitly enabled in the sudoers file which is silly when I'm just trying to run something else that is enabled for the user:
if ! sudo -u #{@user} whoami > /dev/null
then echo "You cannot switch to user '#{@user}' using sudo, please check the sudoers file" 1>&2
false
fi

@leehambley
Copy link
Member

We'll take a PR, but I still think the error message is better this way.

@abhishiv
Copy link

Yes, please this check is indeed very silly. If someone can send a PR to fix this it would be great!

@leehambley
Copy link
Member

I was clear five years ago when I advised that we're open to taking a patch, but that we designed it this way for a reason. Times change, and good error messages on ops tooling is important.

The other maintainers and I would be glad to assist with getting a patch to the required standard to be merged if we can maintain our standards.

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

3 participants