Skip to content

Commit 554bed2

Browse files
committed
Added documentation and added permissions to new users
1 parent de1cc5e commit 554bed2

3 files changed

Lines changed: 52 additions & 2 deletions

File tree

New-User-Creator/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ This is how to setup a special user named **`login`** that automatically runs a
1313
sudo adduser login
1414
```
1515

16+
You will also need to make the login User a Sudoer by running the following command:
17+
18+
```bash
19+
sudo usermod -aG sudo login
20+
```
21+
1622
---
1723

1824
### 2. Edit the `.bashrc` File

New-User-Creator/create_user.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
echo "Creating a new user account..."
44

55
# Loop until a valid username is entered
6+
echo "Enter a username (only letters, numbers, underscores, or dashes):"
67
while true; do
78
read -rp "Please Enter a new username: " newuser
89

@@ -36,8 +37,10 @@ while true; do
3637
fi
3738
done
3839

39-
# Create user with no initial password
40-
sudo adduser --disabled-password --gecos "" "$newuser" &>/dev/null
40+
# Create user with USB-related group access
41+
sudo adduser --disabled-password --gecos "" \
42+
--groups plugdev,dialout,video,audio,input \
43+
"$newuser" &>/dev/null
4144

4245
# Set the entered password
4346
echo "$newuser:$password" | sudo chpasswd

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# SETUP INSTRUCTIONS FOR HIL
2+
3+
## 1. Install ubuntu on to the server
4+
1. Download the latest ubunut version that is LTS and it can be either the Desktop or Server version
5+
2. Install the ubuntu on the server
6+
**Make sure to enable SSH**
7+
3. Create a user account for the server which will be he main account
8+
4. update the server by running the following commands
9+
```bash
10+
sudo apt update && sudo apt upgrade -y
11+
```
12+
## 2. Setup remote access to the server
13+
1. follow the instructions in the [Remote Access file](Remote-Access/README.md)
14+
15+
## 3. Setup Github Actions runner
16+
**You will need admin in github to do this**
17+
1. Go to the settings of the organization then go to actions->runners and click on the "Add New Runner" button
18+
2. Follow the instructions to add a new runner
19+
3. Once the runner is added, go to the settings of the organization and click on the "Configure" button and enable it to run on all repositories and on public repositories
20+
4. Make the runner always start after a system restart by running the following command
21+
```bash
22+
./svc.sh install
23+
./svc.sh start
24+
```
25+
5. Check the status of the runner by running the following command
26+
```bash
27+
./svc.sh status
28+
```
29+
## 4. Setup the scripts
30+
1. Go to the actions tab on the repository and click on the workflows that correspond to the scripts you want to add to the server
31+
2. Click on the "Run workflow" button and wait for the workflow to complete
32+
3. Onece it is completed the scripts will be added to the server
33+
4. Finaly got in to [Show-Active-Users](Show-Active-Users/README.md) and [New-User-Creator](New-User-Creator/README.md) folders and follow the instructions in the README.md file to finalize the setup
34+
35+
36+
# Maintaining the server
37+
1. To update the server run the following commands in your home directory this will run the update.sh script
38+
```bash
39+
./update.sh
40+
```
41+
2. Any updates to the scripts will be automatically pushed to the server apon push to the main branch

0 commit comments

Comments
 (0)