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

Requires passwordless sudo #8

Open
darkone23 opened this issue Mar 6, 2014 · 1 comment
Open

Requires passwordless sudo #8

darkone23 opened this issue Mar 6, 2014 · 1 comment

Comments

@darkone23
Copy link
Contributor

The script uses su - $owner everywhere to run commands as the result of whoami.
This results in tty tickets if you don't have passwordless sudo.

Why not just run the commands instead?

For example,

Instead of:

have_host=$(su - $owner -c "ssh-keygen -F $keygen_name -f $file")

Why not just:

have_host=$(ssh-keygen -F $keygen_name -f $file)
@panpomaly
Copy link

After fixing a problem with the default file path (3b1fbf4), i was also wondering why using su - $owner at all.
su will ask for a password if not run as root.

This could probably all be done as $(whoami) and fix the permissions later or just use the first version of this module (9d05b6e) and use sudo_user and sudo for the ansible task.
I'm doing the latter.

senosa added a commit to senosa/my-server that referenced this issue May 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants