operating_systems:raspbian:minimal_configuration
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
operating_systems:raspbian:minimal_configuration [2019/05/27 09:33] – [root] maferreira | operating_systems:raspbian:minimal_configuration [2019/07/08 15:14] – [sshd_config file] maferreira | ||
---|---|---|---|
Line 2: | Line 2: | ||
===== Enable root account ===== | ===== Enable root account ===== | ||
As root account is disabled by default on raspbian, we need to activate it. But before doing that, mount / in read-write mode. | As root account is disabled by default on raspbian, we need to activate it. But before doing that, mount / in read-write mode. | ||
- | | + | |
- | # passwd root | + | # passwd root |
And then enter the new password you want. | And then enter the new password you want. | ||
- | | + | |
===== Rename user ===== | ===== Rename user ===== | ||
- | | + | |
- | # usermod -m -d /home/acdsn acdsn | + | # usermod -m -d /home/acdsn acdsn |
Set a password to the user | Set a password to the user | ||
- | | + | |
===== Rename group ===== | ===== Rename group ===== | ||
- | | + | |
===== Rename hostname ===== | ===== Rename hostname ===== | ||
- | | + | |
Replace the existing hostname by the new one. | Replace the existing hostname by the new one. | ||
===== SSH connection ===== | ===== SSH connection ===== | ||
====Generate ssh keys==== | ====Generate ssh keys==== | ||
- | | + | |
Add your public key to the server eG file (/ | Add your public key to the server eG file (/ | ||
====sshd_config file==== | ====sshd_config file==== | ||
- | | + | |
- | + | ||
- | # | + | From |
- | # | + | |
- | # | + | |
- | # | + | # |
+ | # | ||
+ | # | ||
+ | |||
+ | To | ||
+ | |||
+ | | ||
+ | PermitRootLogin no | ||
+ | PubkeyAuthentication yes | ||
+ | PasswordAuthentication no | ||
====Allow connection from the server==== | ====Allow connection from the server==== | ||
Create the **/ | Create the **/ | ||
Line 38: | Line 47: | ||
**uhubctl** is utility to control USB power per-port on smart USB hubs. Smart hub is defined as one that implements per-port power switching.\\ | **uhubctl** is utility to control USB power per-port on smart USB hubs. Smart hub is defined as one that implements per-port power switching.\\ | ||
In order to install it, follow the following steps: | In order to install it, follow the following steps: | ||
- | | + | |
Install uhubctl dependency: | Install uhubctl dependency: | ||
- | | + | |
Compile the source code: | Compile the source code: | ||
- | | + | |
Once the program is compiled, turn off usb ports power. But first, let's check usb ports ids. | Once the program is compiled, turn off usb ports power. But first, let's check usb ports ids. | ||
- | # ./uhubctl | + | # ./uhubctl |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
Now, you have identified the usb ports ids. Turn off their power. | Now, you have identified the usb ports ids. Turn off their power. | ||
- | # ./uhubctl -a on -p 2 | + | # ./uhubctl -a on -p 2 |
<note warning> | <note warning> | ||
Add the last command to your crontab table. | Add the last command to your crontab table. | ||
- | | + | |
====References==== | ====References==== | ||
Line 65: | Line 74: | ||
===== Change timezone ===== | ===== Change timezone ===== | ||
For me, the default timezone was London. To change it, type: | For me, the default timezone was London. To change it, type: | ||
- | | + | <code bash> |
+ | # dpkg-reconfigure tzdata | ||
+ | </ | ||
===== Crontabs ===== | ===== Crontabs ===== | ||
Since /var/spool in mounted on tmps, crontab files don't exist and so, crontab will fail. To solve this, move/add crontab files for the user you want. | Since /var/spool in mounted on tmps, crontab files don't exist and so, crontab will fail. To solve this, move/add crontab files for the user you want. | ||
- | | + | |
- | | + | |
Make sure you have the following file rights: | Make sure you have the following file rights: | ||
- | | + | <code bash> |
- | drwxr-xr-x 89 root root 4096 May 6 11:05 .. | + | |
- | -rw-r--r-- | + | drwxr-xr-x 89 root root 4096 May 6 11:05 .. |
- | -rw------- | + | -rw-r--r-- |
+ | -rw------- | ||
+ | </code> | ||
<note warning> | <note warning> | ||
Line 84: | Line 97: | ||
==== acdsn ==== | ==== acdsn ==== | ||
- | | + | |
<code bash> | <code bash> | ||
#! /bin/bash | #! /bin/bash | ||
Line 105: | Line 118: | ||
==== root ==== | ==== root ==== | ||
<code bash> | <code bash> | ||
- | | + | # mv / |
- | # mv / | + | # mv / |
- | # ln -s / | + | # ln -s / |
</ | </ | ||