My ubuntu new server checklist
Ok so I setup a new ubuntu server every once in a while and I have a hard time figuring everything out. So here's my checklist of the stuff I end up painstakingly look up to do over and over again.
- Create New User
- sudo useradd -d /home/NEWUSER -m NEWUSER (the d flag is to set the home directory and the m flag is to create the directory)
- Change Password
- sudo passwd testuser
- Add User to admin group OR do #4
- usermod -g admin NEWUSER
- Give Sudo Access in /etc/sudoers (the first is no password asked for sudo, and the 2nd asks for password to sudo)
- user1 ALL=(ALL) NOPASSWD:ALL
- user2 ALL=(ALL) ALL
- Enable Bash Script on new user
- Go to /etc/passwd and change line to something like this: user1:x:1001:1001::/home/user1:/bin/bash
- SSH disconnecting? Well, keep the connection alive.
- Edit /etc/ssh/sshd_config
- Add line TCPKeepAlive yes
- Bash rc stuff
- Edit ~/.bashrc
- grep auto-coloring: export GREP_OPTIONS='--color=auto'
- rails env: export RAILS_ENV=staging
