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

setting dstuser file ownership in __ssh_authorized_key #52

Closed

Conversation

nuex
Copy link
Contributor

@nuex nuex commented Apr 10, 2012

I was having trouble logging in as a __ssh_authorized_key provisioned user after the /home/$dstuser/.ssh/authorized_key file was created, which I believe was due to permissions not being properly set on the $dstuser's files. This commit gives $dstuser (if defined) ownership of the .ssh directory and authorized_keys file, allowing them to log in.

# that user's ownership credentials
if [ "$dstuser" ]; then
__directory $sshpath --owner $dstuser --group $dstuser --mode 700
# if no destination user is defined, create the .ssh directory as root
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about a group being different named then the user?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that using --owner could always be done (root or $dstuser)

I think we can even setup dstuser=root, if dstuser is not given

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a --ssh-directory-group parameter?

@telmich telmich closed this May 31, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants