www-data should be a user account.

main
Robert 2 years ago
parent a98d477c06
commit 1adf405d3e
  1. 16
      protected/README.MD

@ -12,10 +12,12 @@ Note: I use the greater-than sign > for the MySQL prompt commands.
Note: The apt-get package mgr is used by debian Linux like Ubuntu.
```
## Make web group
## Make www-data system-user account
```
# You'll want a web group to be created.
$ sudo groupadd www-data
# See if the account already exists?
$ id www-data
# If it says no such user, then:
$ sudo useradd --system --no-create-home --shell /usr/sbin/nologin www-data
```
## Make a Regular user account, if only the root account exists currently.
@ -53,17 +55,19 @@ $ sudo systemctl enable mysql
# Lets make a secure password for use with MySQL root account.
$ MROOT=$(openssl rand -base64 18)
$ echo "MySQL Root password is now: $MROOT"
# Copy this password to the clipboard
# The following script will prompt you to perform various security-related actions. Follow the prompts to set a root password, remove anonymous users, disallow root login remotely, remove the test database, and reload the privilege tables.
# The following script will prompt you to perform various security-related actions. Follow the prompts to set a root password (Paste in the password from the clipboard), remove anonymous users, disallow root login remotely, remove the test database, and reload the privilege tables.
$ sudo mysql_secure_installation
# Lets make a secure password for use with MySQL user account EX zoombox.
$ CMSPWD=$(openssl rand -base64 18)
$ echo "MySQL cms database user zoombox account password is now: $CMSPWD"
# Copy this password to the clipboard now
# Lets create a new user account for mysql
$ mysql -u root -p$MROOT
> CREATE USER 'zoombox'@'localhost' IDENTIFIED BY 'Enter_the_Password_for_user_zoombox_in_the_step_above_here';
> CREATE USER 'zoombox'@'localhost' IDENTIFIED BY 'Paste_IN_The_Password_for_user_zoombox_in_the_step_above_here';
> GRANT ALL ON cms.* TO 'zoombox'@'localhost';
> create database cms;
> exit
@ -209,4 +213,4 @@ $ sudo systemctl restart apache2
If installed nginx:
$ sudo certbot --nginx
$ sudo systemctl reload nginx
```
```

Loading…
Cancel
Save