gravitational / teleport-plugins

Set of plugins for Teleport
Apache License 2.0
81 stars 82 forks source link

Issues with Teleport Configure #90

Closed benarent closed 3 years ago

benarent commented 4 years ago

Issue 1: I can't sudo teleport-slack configure > /etc/teleport-slack.toml -bash: /etc/teleport-slack.toml: Permission denied <- If it's not possible to with sudo we shouldn't recommend this method to our users.

Issue 2: The CLI outputs slack configure should be teleport-slack configure

Teleport Slack binaries have been copied to /usr/local/bin
You can run slack configure > /etc/teleport-slack.toml to bootstrap your config file
teleport-421-auth ~/teleport-access-slack: teleport-slack configure > /etc/teleport-slack.toml
-bash: /etc/teleport-slack.toml: Permission denied
teleport-421-auth ~/teleport-access-slack: sudo teleport-slack configure > /etc/teleport-slack.toml
-bash: /etc/teleport-slack.toml: Permission denied
natikgadzhi commented 4 years ago

Or rather — I'll research what's the right sudosyntax for this command, I had the same issue before.

natikgadzhi commented 4 years ago

@benarent sudo fails, because by default sudo applies only to the first command in the line, whereas everything after > is technically the second command, hence some magic needed (sudo sh -c).

re: should we recommend the command, we have options:

  1. We can specifically tell users to run sudo sh -c 'teleport-slack configure > /etc/teleport-slack.toml', that would work.
  2. We can keep the current recommendation, which is to run teleport-slack configure without mentioning sudo. This recommendation is correct and kinda assumes that our users know how to work with OS users and permissions themselves.

What do you think?

natikgadzhi commented 3 years ago

@benarent should we close this? ;)

benarent commented 3 years ago

yes, we can close this.