Generalized examples

This commit is contained in:
Michele Cereda
2023-03-04 12:56:49 +01:00
parent bf7455519f
commit 30b1465397
8 changed files with 20 additions and 20 deletions

View File

@@ -87,8 +87,8 @@ $ locale-gen
$ mkinitcpio -p linux $ mkinitcpio -p linux
# utenza personale # utenza personale
$ useradd --create-home --groups wheel --user-group mek $ useradd --create-home --groups wheel --user-group user
$ passwd mek $ passwd user
$ visudo $ visudo
# grub # grub

View File

@@ -131,8 +131,8 @@ emerge \
--quiet --verbose \ --quiet --verbose \
app-admin/sudo app-admin/sudo
echo '%wheel ALL=(ALL) ALL' | tee /etc/sudoers.d/wheel echo '%wheel ALL=(ALL) ALL' | tee /etc/sudoers.d/wheel
useradd -m -G users,wheel,audio -s /bin/bash mek useradd -m -G users,wheel,audio -s /bin/bash user
passwd mek passwd user
passwd -l root passwd -l root
emerge \ emerge \

View File

@@ -27,7 +27,7 @@ emerge \
kde-plasma/plasma-meta kde-plasma/plasma-meta
rc-update add dbus default rc-update add dbus default
rc-update add elogind default rc-update add elogind default
cat > /home/mek/.xinitrc <<EOF cat > /home/user/.xinitrc <<EOF
#!/bin/sh #!/bin/sh
exec dbus-launch --exit-with-session startplasma-wayland exec dbus-launch --exit-with-session startplasma-wayland
EOF EOF

View File

@@ -13,6 +13,6 @@ envsubst < input.file > output.file
$ cat hello.file $ cat hello.file
hello $NAME hello $NAME
$ NAME='mek' envsubst < hello.file $ NAME='Johnny' envsubst < hello.file
hello mek hello Johnny
``` ```

View File

@@ -25,7 +25,7 @@ PID | PPID | UID | User | Command | Service
731 | 1 | 488 | avahi | avahi-daemon | avahi-daemon 731 | 1 | 488 | avahi | avahi-daemon | avahi-daemon
736 | 1 | 490 | messagebus | dbus-daemon | dbus 736 | 1 | 490 | messagebus | dbus-daemon | dbus
6260 | 1756 | 1000 | mek | kdeinit5 | 6260 | 1756 | 1000 | user | kdeinit5 |
You may wish to restart these processes. You may wish to restart these processes.
See 'man zypper' for information about the meaning of values in the above table. See 'man zypper' for information about the meaning of values in the above table.

View File

@@ -1,16 +1,16 @@
# SSH # SSH
1. [TL;DR](#tldr) 1. [TL;DR](#tldr)
2. [Key Management](#key-management) 1. [Key Management](#key-management)
3. [Configuration](#configuration) 1. [Configuration](#configuration)
1. [Append domains to a hostname before attempting to check if they exist](#append-domains-to-a-hostname-before-attempting-to-check-if-they-exist) 1. [Append domains to a hostname before attempting to check if they exist](#append-domains-to-a-hostname-before-attempting-to-check-if-they-exist)
2. [Optimize connection handling](#optimize-connection-handling) 1. [Optimize connection handling](#optimize-connection-handling)
4. [SSHFS](#sshfs) 1. [SSHFS](#sshfs)
1. [Installation](#installation) 1. [Installation](#installation)
5. [Troubleshooting](#troubleshooting) 1. [Troubleshooting](#troubleshooting)
1. [No matching host key type found](#no-matching-host-key-type-found) 1. [No matching host key type found](#no-matching-host-key-type-found)
6. [Further readings](#further-readings) 1. [Further readings](#further-readings)
7. [Sources](#sources) 1. [Sources](#sources)
## TL;DR ## TL;DR
@@ -90,8 +90,8 @@ ssh-keygen -R 'raspberrypi.lan' -f '.ssh/known_hosts'
```plaintext ```plaintext
Host pi4.lan found: line 5 Host pi4.lan found: line 5
/home/mek/.ssh/known_hosts updated. /home/user/.ssh/known_hosts updated.
Original contents retained as /home/mek/.ssh/known_hosts.old Original contents retained as /home/user/.ssh/known_hosts.old
``` ```
Change password of a key file Change password of a key file

View File

@@ -4,7 +4,7 @@ sudo zypper install --no-confirm \
boinc-client \ boinc-client \
boinc-manager boinc-manager
sudo usermod --append --groups boinc mek sudo usermod --append --groups boinc "$USER"
# stop computation when user active # stop computation when user active
xhost +SI:localuser:boinc xhost +SI:localuser:boinc

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env sh #!/usr/bin/env sh
: "${USER_FULL_NAME:='Mek'}" : "${USER_FULL_NAME:?'not set'}"
: "${USER_NAME:='mek'}" : "${USER_NAME:?'not set'}"
: "${USER_PASSWORD:?'not set'}" : "${USER_PASSWORD:?'not set'}"
: "${USER_TYPE:='local'}" : "${USER_TYPE:='local'}"