mirror of
https://github.com/ovh/the-bastion.git
synced 2026-05-09 16:35:33 +02:00
[GH-ISSUE #208] selfAddPersonalAccess fails with "sudo: a password is required" #57
Labels
No labels
answered
bug
documentation
enhancement
enhancement
feature
feature
kept-open-for-info
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/the-bastion#57
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @siexp on GitHub (Jun 27, 2021).
Original GitHub issue: https://github.com/ovh/the-bastion/issues/208
Trying to add access to host but command fails with
sudo: a password is requiredfor both privileged and sudoer usersbastion version
3.03.01with default setup from documentation@speed47 commented on GitHub (Jun 28, 2021):
This command is restricted, so a bastion admin must first grant you this command (using
--osh accountGrantCommand --account YOU --command selfAddPersonalAccess). However, you should get a nicer error message, and not the kinda rough way of sudo telling you that you can't do it:Of course, if you happen to be a bastion admin, then all these commands should be granted to you, including
selfAddPersonalAccess.Does the
selfAddPersonalAccesscommand appear when you runbssh --osh help? It shows you only commands you have access to. I'll have different suggestions for troubleshooting depending on whether it appears here or not (might be an issue with your sudo installation).@siexp commented on GitHub (Jun 29, 2021):
@speed47 thank you for the reply,
And this is a case even for superowner account?
P. S.
I'm following steps in this guide https://ovh.github.io/the-bastion/using/basics.html#bastion-alias
@speed47 commented on GitHub (Jun 29, 2021):
Yes it is. A super-owner is implicity an owner of all the groups, but this person still need to be granted on restricted commands they might need. You can use the
--osh accountGrantCommandwith no parameters to get the list of all the commands that can be granted this way. The list is also available in the documentation.I'm currently working on a PR to add documentation on several topics, I'll take this opportunity to add the following note right under "Setting up access to a server":
Note that if for your setup, you'd like for everybody to have access to the
selfAddPersonalAccesscommand, as if it wasn't restricted (we do have this setup in some of our bastions), you can use the this option in bastion.conf to do so.