-
Notifications
You must be signed in to change notification settings - Fork 489
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
Login as one user and run commands as a deploy user #574
Comments
You are correct in your assumption about mina running in non-interactvie ssh mode. I believe a fix would be to set execution mode to system
Another solution would be to remove the need of a password when changing su to deploy. |
it appears that the deploy user was already set with NOPASSWD |
We do not have this kind of setup so I can't test it unfortunately. Will try to set something up in the coming days and see if I can find a fix/workaround for this problem |
Ok cool !
…On Oct 6, 2017 7:46 AM, "štef" ***@***.***> wrote:
We do not have this kind of setup so I can't test it unfortunately.
Will try to set something up in the coming days and see if I can find a
fix/workaround for this problem
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#574 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADSY7zQS5Ev1SXUhkgizUPtdKnrtdpOMks5spczAgaJpZM4Pry2H>
.
|
hi guys
i have encountered a scenario where for the sake of security commands must run as a 'deploy' user but i login as 'alex'
how can i switch users before executing any commands and ideally without touching mina source code ?
so far i have added a new task in mina-1.0.7/tasks/mina/deploy.rb
task :switch_user do command %{sudo su - deploy} end
which i invoke in the setup task but i when i run the mina setup it hangs. I assume this is because mina is running in a non-interactive ssh mode.
when i add this task in the generated deploy.rb setup task it runs last
thanks
alex
The text was updated successfully, but these errors were encountered: