[tecmint.com complete guide to users](http://www.tecmint.com/add-users-in-linux/)
[How To Configure SSH Key-Based Authentication on a Linux Server](https://www.digitalocean.com/community/tutorials/how-to-configure-ssh-key-based-authentication-on-a-linux-server)
#### postgres
[ubuntu community postgres docs](https://help.ubuntu.com/community/PostgreSQL)
## adding/deleting users
#### adding a user:
*("www-data" is the group name for website stuff on gandi)*
1. Open the [amazon EC2 console](https://console.aws.amazon.com/ec2/)
2. Choose **Launch Instance**
3. The *Choose an Amazon Machine Image (AMI)* page has basic configuration, so pick the first *ubuntu* configuration
4. This will take you to the *Choose an Instance Type* page, this chooses the hardware configuration, you want to pick **t2.micro**
5. Hit **Review and Launch**
6. This will take you to *Review Instance Launch* page, and that has an option for **Security Groups**, hit **Edit security groups**, on the page that pops up, pick the options you want to allow for your instance
7. When finished, hit "done" or whatever and you'll be taken back to the *Review Instance Launch* page, from here hit the **Launch** key
8. this will prompt you for a key pair. There are a few options. Create a new Pair and choose an existing key pair
####key pair info:
[aws info on key pairs](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html)
[scroll down to find the "echo" comment](https://forums.aws.amazon.com/message.jspa?messageID=495274)
there is an issue with ubuntu instances on AWS, the name given in /etc/hostname doesn't match what exist in /etc/hosts. So if you try using sudo you'll get an error.
To fix this, you need to change those files, to get into sudo type in:
sudo su -
echo "127.0.0.1 $(hostname)" >> /etc/hosts
This will update /etc/hosts with the default hostname generated by amazon. Alternatively you can do what it says in the first link [aws ubuntu hostname](https://aws.amazon.com/premiumsupport/knowledge-center/linux-static-hostname/)
### setup visudo
sudo update-alternatives --config editor
su -c 'visudo'
find this line:
USERNAME ALL=(ALL) NOPASSWD: ALL
replace it with:
admin ALL=(ALL) ALL
## add new user
[adding a user on linux AWS](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/managing-users.html)
[how to get an add the public key to the new user](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html#retrieving-the-public-key)