Created
December 14, 2019 08:13
-
-
Save Gnnng/205296e208042f4351862833c379c549 to your computer and use it in GitHub Desktop.
Create new user with sudo permission and github keys imported
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
name=$1 | |
gh_name=$2 | |
sudo adduser --gecos "" --disabled-password ${name} | |
sudo adduser "${name}" sudo | |
sudo runuser - "${name}" ssh-import-id-gh "${gh_name}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment