mirror of
https://github.com/kevinveenbirkenbach/raspberry-pi-tools.git
synced 2024-11-22 18:11:03 +01:00
Updated permissions
This commit is contained in:
parent
ae60d9ae75
commit
4978f6c54e
17
README.md
17
README.md
@ -2,13 +2,14 @@
|
|||||||
This repository contains some shell scripts to install Arch Linux for the Raspberry Pi on a SD-Card and to backup a SD-Card.
|
This repository contains some shell scripts to install Arch Linux for the Raspberry Pi on a SD-Card and to backup a SD-Card.
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
### Guided
|
### SD-Card
|
||||||
|
#### Guided
|
||||||
To install a Linux distribution manually on a SD card type in:
|
To install a Linux distribution manually on a SD card type in:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bash ./sd_setup.sh
|
bash ./sd_setup.sh
|
||||||
```
|
```
|
||||||
### Piped
|
#### Piped
|
||||||
To pase the configuration to the program use this syntax:
|
To pase the configuration to the program use this syntax:
|
||||||
```bash
|
```bash
|
||||||
(
|
(
|
||||||
@ -21,6 +22,18 @@ To pase the configuration to the program use this syntax:
|
|||||||
echo "y" #Copy wifi configurations to target system
|
echo "y" #Copy wifi configurations to target system
|
||||||
)| sudo bash ./sd_setup.sh
|
)| sudo bash ./sd_setup.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### System
|
||||||
|
#### Arch
|
||||||
|
```bash
|
||||||
|
pacman-key --init
|
||||||
|
pacman-key --populate archlinuxarm
|
||||||
|
```
|
||||||
|
#### Ubuntu\\Debian
|
||||||
|
```bash
|
||||||
|
sudo apt update
|
||||||
|
sudo apt upgrade
|
||||||
|
```
|
||||||
## Backup
|
## Backup
|
||||||
To backup a SD card type in:
|
To backup a SD card type in:
|
||||||
|
|
||||||
|
@ -247,7 +247,8 @@ if [ -f "$origin_user_rsa_pub" ]
|
|||||||
target_authorized_keys_content=$(cat "$target_authorized_keys")
|
target_authorized_keys_content=$(cat "$target_authorized_keys")
|
||||||
echo "$target_authorized_keys contains the following: $target_authorized_keys_content"
|
echo "$target_authorized_keys contains the following: $target_authorized_keys_content"
|
||||||
chown -vR 1000 "$target_user_ssh_folder_path"
|
chown -vR 1000 "$target_user_ssh_folder_path"
|
||||||
chmod -vR 400 "$target_user_ssh_folder_path"
|
chmod -v 700 "$target_user_ssh_folder_path"
|
||||||
|
chmod -v 600 "$target_authorized_keys"
|
||||||
else
|
else
|
||||||
echo "The ssh key \"$origin_user_rsa_pub\" can't be copied to \"$target_authorized_keys\" because it doesn't exist."
|
echo "The ssh key \"$origin_user_rsa_pub\" can't be copied to \"$target_authorized_keys\" because it doesn't exist."
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user