From ac528db879765c5e2ed227823c46436bd505c4d3 Mon Sep 17 00:00:00 2001 From: Robert Date: Sat, 23 Dec 2023 13:46:44 -0500 Subject: [PATCH] MYNEWUSER var set. --- protected/README.MD | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/protected/README.MD b/protected/README.MD index 76f3fea..449d0b6 100644 --- a/protected/README.MD +++ b/protected/README.MD @@ -21,20 +21,21 @@ $ sudo groupadd www-data ## Make a Regular user account, if only the root account exists currently. ``` # Log in as Root user here -# replace newuser with a name you desire like jellybeansara -$ sudo adduser newuser -$ sudo usermod -aG www-data newuser -$ sudo usermod -aG sudo newuser +# replace jellybeansara with a user account name you desire like fredsmith +$ MYNEWUSER=jellybeansara +$ sudo adduser $MYNEWUSER +$ sudo usermod -aG www-data $MYNEWUSER +$ sudo usermod -aG sudo $MYNEWUSER ``` ## Git clone repo to pull it ``` $ sudo mkdir -p /var/www $ sudo chgrp www-data /var/www -# If not Root user do next command, else if root replace $USER with newuser name like jellybeansara. -$ sudo chown $USER /var/www +$ if [ -z "$MYNEWUSER" ]; then MYNEWUSER="$USER"; fi +$ sudo chown $MYNEWUSER /var/www $ sudo chmod 775 /var/www -$ sudo apt-get update && sudo apt-get install git +$ sudo apt-get update && sudo apt-get install git openssl # AS a normal user NOT Root, we will sudo or doas for that from most of the time: $ cd /var/www $ git clone https://git.mysnippetsofcode.com/bobs/cms @@ -62,7 +63,7 @@ $ echo "MySQL cms database user zoombox account password is now: $CMSPWD" # Lets create a new user account for mysql $ mysql -u root -p$MROOT -> CREATE USER 'zoombox'@'localhost' IDENTIFIED BY 'Enter_the_password_used_by_CMSPWD_zoombox_in_the_step_above'; +> CREATE USER 'zoombox'@'localhost' IDENTIFIED BY 'Enter_the_Password_for_user_zoombox_in_the_step_above_here'; > GRANT ALL ON cms.* TO 'zoombox'@'localhost'; > create database cms; > exit @@ -93,7 +94,7 @@ DB_TYPE=mysql DB_HOST=127.0.0.1 DB_NAME=cms DB_USERNAME=zoombox -DB_PASSWORD=Enter_the_password_used_by_MYSQL_CMSPWD_user_zoombox_account_for_cms_DB +DB_PASSWORD=Enter_the_Password_for_user_zoombox_here ADMIN_USERS=zug:SunSet@XQWET,zig:CHANGE_ME_AS_WELL_MAKE_ONE_UP_HERE ``` (for Nano editor) Press ctrl+x to Save and Exit. Y to save. Enter to the default filename...