Linux Cheat Sheet – Users
Create User
useradd --create-home -c "Account to run the something app" something
Eek, reverse it
userdel -r something
SSH Instance Access
Set up an ssh key, and add it to the current user’s authorized keys.
cd sshgen -f company # set it up with no password cat company.pub >> .ssh/authorized_keys # make sure to save off the public and private keys. One way: aws s3 cp company s3://my-bucket/company aws s3 cp company.pub s3://my-bucket/company.pub
Location for sudo privs
/etc/sudoers.d/cloud-init
Also helpful: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/managing-users.html