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

su: must be run from a terminal #633

Closed
kvivek1115 opened this issue Sep 4, 2020 · 0 comments · Fixed by #636
Closed

su: must be run from a terminal #633

kvivek1115 opened this issue Sep 4, 2020 · 0 comments · Fixed by #636

Comments

@kvivek1115
Copy link

kvivek1115 commented Sep 4, 2020

Version:

3.3.6 or latest master

Environment:

Vagrant Ubuntu 18.04

Scenario:

In order to perform knife bootstrap with a different root password to the authenticated user chef/chef#10181
it required to hit su - USER command

Steps to Reproduce:

require 'train'
train = Train.create('ssh', host: 'node1.test', port: 22, user: 'vagrant', key_files: './.vagrant/machines/default/virtualbox/private_key')

conn = train.connection
res = conn.run_command('su - root')

puts "STDOUT: #{res.stdout}"
puts "STDERR: #{res.stderr}"

>
STDOUT:
STDERR: su: must be run from a terminal

Expected Result:

it should at least open the new session for suing user.

Actual Result:

Raises an error STDERR: su: must be run from a terminal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant