Setting up user accounts

At the moment, we are logging in as root, which is the administrative user of the machine with all privileges. This means a root user can do dangerous things, such as deleting every file in the system with rm -rf /. If a malicious user gains access to your root account, or if you accidentally issue the wrong command, then there's no turning back; most of these actions are irreversible.

Therefore, to protect our server from both malicious parties and human error, it's advisable to not use root on an everyday basis. Instead, we should set up an account with reduced privileges, and only use root privileges when we need to (for example, when installing system-wide software).

Get Building Enterprise JavaScript Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.