I've set up Ubuntu 20.xx as a web server in the cloud provided by Digital Ocean and wish to install Node, Express, Mongo and possibly NginX.
In several articles there is mention of disabling root user to improve security and create a new user with administration access.
In order, I created a new user and then used this to set-up all applications but ran into issue with nginx.
Should I instead use root user to set-up all applicatons first, and allow applications to run under root ?
Then create a second admin user with ssh access and then disable ssh for root?
UPDATE1: Thanks for your assistance all, I've updated the question and added its a cloud install.
UPDATE2:
Thanks for the detailed explanation. As I understand it :
- A Sudo user has the same privileges as root
- A Sudo user can be tracked who performed actions (of relevance when multiple users are concerned)
- Web applications (node, pm2, mongo) can be installed EITHER with
root account and/or sudo user accounts, because these applications should run with their own default user accounts. - Disable root ssh in due course to protect against brute force attacks