diff options
author | Andreas Fankhauser hiddenalpha.ch | 2024-09-11 20:12:03 +0200 |
---|---|---|
committer | Andreas Fankhauser hiddenalpha.ch | 2024-09-11 20:12:03 +0200 |
commit | 2137852d1b120a055633abb5508b412c70943f0a (patch) | |
tree | 98c76cd78806921526cf6fd92ad8063edc69e1f6 /doc | |
parent | 5a5917991106831337815a6434ff097255c4367f (diff) | |
download | UnspecifiedGarbage-2137852d1b120a055633abb5508b412c70943f0a.zip UnspecifiedGarbage-2137852d1b120a055633abb5508b412c70943f0a.tar.gz |
typos in raspi doc.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/note/rasbpi/rasbpi.txt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/doc/note/rasbpi/rasbpi.txt b/doc/note/rasbpi/rasbpi.txt index fa89449..a070ca0 100644 --- a/doc/note/rasbpi/rasbpi.txt +++ b/doc/note/rasbpi/rasbpi.txt @@ -17,6 +17,8 @@ debian page which says 64k. ## Enable UART serial +WARN: No matter what I try, UART is NOT going to work. + Check in "${BOOTROOT:?}/config.txt" that "enable_uart=1" is on (it sould already be on). @@ -30,18 +32,18 @@ Then use: cu --nortscts -s 9600n8 -l /dev/ttyUSB? Problem: raspbian image comes WITHOUT sudo installed. Workaround: Put ssh pub key to "/root/.ssh/authorized_keys" and remove - after setup is complete. + after setup is complete (aka drop file again and disable root login). # Prepare a password mkpasswd --method=sha-512 --stdin - && USERNAME="andreas" \ + && USERNAME="TODO_chooose_pi_username" \ && PASS="TODO_put_your_HASHED_pw_here" \ && USERID="1000" \ && PUB_KEY_FILE="/tmp/path-to-pub-key.ssh2" \ && SYSROOT="/mnt/_" \ - && true \ && SSHD_CONFIG="${SYSROOT:?}/etc/ssh/sshd_config" \ + && `# user setup ` \ && if grep -q ":${USERID:?}:" "${SYSROOT:?}/etc/passwd"; then echo "User ${USERNAME} already exists"; false; fi \ && echo "${USERNAME:?}:x:${USERID:?}:${USERID:?}::/home/${USERNAME:?}:/bin/bash" | $SUDO tee -a "${SYSROOT:?}/etc/passwd" >/dev/null \ && if grep -q ":${USERID:?}:" "${SYSROOT:?}/etc/group"; then echo "Group ${USERID} already exists"; false; fi \ @@ -59,7 +61,7 @@ Workaround: Put ssh pub key to "/root/.ssh/authorized_keys" and remove && $SUDO find "${SYSROOT:?}/home/${USERNAME}/.ssh" -type d -exec chmod 700 {} + \ && $SUDO find "${SYSROOT:?}/home/${USERNAME}/.ssh" -type f -exec chmod 600 {} + \ && $SUDO sed -i -E 's_^(sudo:x:([0-9]+):)$_\1'${USERNAME:?}'_' "${SYSROOT:?}/etc/group" \ - && `# sshd config (hardened) ` \ + && `# sshd config` \ && $SUDO sed -i -E 's_^#(Port 22)$_\1_' "${SSHD_CONFIG:?}" \ && $SUDO sed -i -E 's_^#(AddressFamily any)$_\1_' "${SSHD_CONFIG:?}" \ && $SUDO sed -i -E 's_^#(ListenAddress 0.0.0.0)$_\1_' "${SSHD_CONFIG:?}" \ |