Skip to content

Commit

Permalink
always load userinfo from passwd (#298)
Browse files Browse the repository at this point in the history
Fixes: #297
  • Loading branch information
evgeni authored Feb 26, 2019
1 parent b55dd58 commit 34da2e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,8 +692,8 @@ def install_ssh_key_from_string(foreman_ssh_key):
If not set default is ~/.ssh/authorized_keys
"""
print_generic("Installing Remote Execution SSH key for user %s" % options.remote_exec_user)
userpw = pwd.getpwnam(options.remote_exec_user)
if not options.remote_exec_authpath:
userpw = pwd.getpwnam(options.remote_exec_user)
options.remote_exec_authpath = os.path.join(userpw.pw_dir, '.ssh', 'authorized_keys')
foreman_ssh_dir = os.path.join(userpw.pw_dir, '.ssh')
if not os.path.isdir(foreman_ssh_dir):
Expand Down

0 comments on commit 34da2e6

Please sign in to comment.