Last active
August 23, 2017 10:41
-
-
Save Edison-Hsu/b90acf5af30ee5217cb08f6535d5ed86 to your computer and use it in GitHub Desktop.
new user with sudo
This file contains hidden or 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
| # Use the adduser command to add a new user to your system. | |
| adduser #{username} | |
| # Use the usermod command to add the user to the sudo group. | |
| usermod -aG sudo #{username} | |
| # Test sudo access on new user account | |
| su - #{username} | |
| sudo ls -la /root | |
| su - #{username} | |
| mkdir ~/.ssh | |
| touch authorized_keys | |
| # add key |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment