User Tools

Site Tools


pi:raspbian

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
pi:raspbian [2020-05-18 14:40] – [Configure OpenSSH server] italics markup gabrielpi:raspbian [2020-05-18 21:31] – adding tmux and alternative shells gabriel
Line 3: Line 3:
 This page documents my local Raspberry Pi config for a Raspberry Pi 3 running Raspbian.  This is config is based on Raspian Buster Lite released on 2020-02-13 by the Raspberry Pi Foundation which can be found [[https://www.raspberrypi.org/downloads/raspbian/|here]]. This page documents my local Raspberry Pi config for a Raspberry Pi 3 running Raspbian.  This is config is based on Raspian Buster Lite released on 2020-02-13 by the Raspberry Pi Foundation which can be found [[https://www.raspberrypi.org/downloads/raspbian/|here]].
  
-===== Disable automatic resizing of root partition =====+===== Before first boot =====
  
-By default Raspbian attempts to grow the root partition of your system on first boot to fill your entire SD card. +By default Raspbian attempts to grow the root partition of your system on first boot to fill your entire SD card. To disable this option do the following on the SD card image before first boot.
-To disable this option do the following.+
  
-  * Remove custom init script and quiet from /boot/cmdline.txt before first power on. +  * Remove custom init script and quiet from ''/boot/cmdline.txt'' before first power on. 
-  * Remove /etc/init.d/resize script.+  * Remove ''/etc/init.d/resize2fs_once'' script.
  
 ===== After first boot ===== ===== After first boot =====
Line 59: Line 58:
  
 ==== User configuration ==== ==== User configuration ====
 +
 +The following user modifications are made.
 +
 +=== local user ===
  
 Add local user: Add local user:
Line 67: Line 70:
 passwd gabriel passwd gabriel
 </code> </code>
 +
 +=== pi ===
  
 Disable pi user: Disable pi user:
Line 73: Line 78:
 usermod -s /usr/sbin/nologin -p '*' pi usermod -s /usr/sbin/nologin -p '*' pi
 </code> </code>
 +
 +=== root ===
  
 Now set root password. Now set root password.
 +
 +=== ansible ===
 +
 +Add ansible user:
 +
 +<code>
 +groupadd -g 1111 ansible
 +useradd -u 1111 -c "Ansible control user" -g 1111 -m ansible
 +usermod -p '*' ansible
 +</code>
 +
 +Configure the following sudo rule for ansible:
 +
 +<code>
 +# Ansible control user
 +ansible ALL=(ALL) NOPASSWD:ALL
 +</code>
 +
 +Copy SSH keys for Ansible user.
  
 ==== Sudoers config ==== ==== Sudoers config ====
Line 146: Line 172:
 <code> <code>
 cat "HostKey /etc/ssh/ssh_host_ed25519_key" >> /etc/ssh/sshd_config cat "HostKey /etc/ssh/ssh_host_ed25519_key" >> /etc/ssh/sshd_config
-cd /etc/ssh/ ** rm -f *key*+rm -fv /etc/ssh/*key*
 dpkg-reconfigure openssh-server dpkg-reconfigure openssh-server
 </code> </code>
 +
 +==== Packages ====
 +
 +<code>
 +vim
 +ntp
 +isc-dhcp-server
 +bind9
 +dnsutils
 +whois
 +fping
 +git
 +tmux
 +mksh
 +zsh
 +</code>
 +
 +
 +==== Services ====
 +
 +Service modification
 +
 +<code>
 +systemctl disable apt-daily-upgrade.timer
 +systemctl disable apt-daily.timer
 +</code>
 +
 +===== See also =====
 +
 +  * [[quay:dns|Local DNS configuration]]
 +  * [[quay:ntp|Local time service]]
 +  * [[quay:dhcp|Local DHCP service]]
  
 ---- ----
pi/raspbian.txt · Last modified: 2020-05-19 09:39 by gabriel