While experimenting with Ubuntu on a variet of systems I often need to stand up a brand new machine and secure access to it. A lot of providers will setup the machine using the root account and email you a password. I'd rather not use the root user and setup RSA Keys. Doing this manually is a bit of a chore but if you don't have any other options here's how to do it.
- Use adduser to do this quickly.
- Run
adduser <username>
. - Enter a new password twice, Remember this needed for sudo.
This is the section i always forget, I'll usually spend half an hour googling for the chmod settings required.