switch user 'me' => 'app'
[webi-installers/.git] / ssh-adduser / README.md
index 8a27a1016c5c48d76da71691d7948d9106e7c954..c9eeb4d6a47331cb326f1db1e60f6eb61215e3be 100644 (file)
@@ -9,19 +9,19 @@ description: |
 
   `ssh-adduser` will
 
-    1. add the user `me`
+    1. add the user `app`
     2. set a random, 32-character password (as a failsafe)
     3. copy the `root` user's **`~/.ssh/authorized_keys`** (so the same users can still login)
-    4. give the `me` user `sudo` (admin) privileges
-    5. allow `me` to `sudo` without a password
+    4. give the `app` user `sudo` (admin) privileges
+    5. allow `app` to `sudo` without a password
 ---
 
-How to create a new user named 'me':
+How to create a new user named 'app':
 
 ```bash
 # --disable-password prevents a password prompt
 # --gecos "" skips the useless questions
-adduser --disabled-password --gecos "" me
+adduser --disabled-password --gecos "" app
 ```
 
 How to create a and set a random password:
@@ -30,30 +30,30 @@ How to create a and set a random password:
 # sets 'my_password' to 32 random hex characters (16 bytes)
 my_password=$(openssl rand -hex 16)
 
-# uses 'my_password' for to reset and confirm 'me's password
-printf "$my_password"'\n'"$my_password" | passwd me
+# uses 'my_password' for to reset and confirm 'app's password
+printf "$my_password"'\n'"$my_password" | passwd app
 ```
 
-How to make the user 'me' a "sudo"er (an admin):
+How to make the user 'app' a "sudo"er (an admin):
 
 ```bash
-adduser me sudo
+adduser app sudo
 ```
 
-How to allow 'me' to run sudo commands without a password:
+How to allow 'app' to run sudo commands without a password:
 
 ```bash
-echo "me ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/me
+echo "app ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/app
 ```
 
 How to copy allowed keys from root to the new user:
 
 ```bash
-mkdir -p /home/me/.ssh/
-chmod 0700 /home/me/.ssh/
+mkdir -p /home/app/.ssh/
+chmod 0700 /home/app/.ssh/
 
-cat "$HOME/.ssh/authorized_keys" >> /home/me/.ssh/authorized_keys
-chmod 0600 /home/me/.ssh/authorized_keys
+cat "$HOME/.ssh/authorized_keys" >> /home/app/.ssh/authorized_keys
+chmod 0600 /home/app/.ssh/authorized_keys
 
-chown -R me:me /home/me/.ssh/
+chown -R app:app /home/app/.ssh/
 ```