Skip to content
Snippets Groups Projects
Commit 8cd21433 authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Improved public key generation to include uername from user email address @rosetta.

parent 7393c7ba
No related branches found
No related tags found
No related merge requests found
...@@ -148,7 +148,7 @@ def finalize_user_creation(user): ...@@ -148,7 +148,7 @@ def finalize_user_creation(user):
logger.error(out) logger.error(out)
raise ErrorMessage('Something went wrong in creating user keys folder. Please contact support') raise ErrorMessage('Something went wrong in creating user keys folder. Please contact support')
command= "/bin/bash -c \"ssh-keygen -q -t rsa -N '' -f /data/resources/keys/{}_id_rsa 2>/dev/null <<< y >/dev/null\"".format(user.username) command= "/bin/bash -c \"ssh-keygen -q -t rsa -N '' -C {}@rosetta -f /data/resources/keys/{}_id_rsa 2>/dev/null <<< y >/dev/null\"".format(user.email.split('@')[0], user.username)
out = os_shell(command, capture=True) out = os_shell(command, capture=True)
if not out.exit_code == 0: if not out.exit_code == 0:
logger.error(out) logger.error(out)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment