ยง2024-06-04
Build a new rpi3 Model B
-
First boot, change default user ubuntu password,
b10nnnnnn8
-
sudo passwd root
tob2nnnnnn5
-
fix ssh in with error
Permission denied (publickey)
- fix `/etc/ssh/sshd_config
PasswordAuthentication yes <-- originally commented out
KbdInteractiveAuthentication yes <-- default is no
- then restart
sudo systemctl restart ssh
- change machine name to rpi3HAProxy.yushei.net
$ cat /etc/hostname
pi3HAProxy.munetaka.me
- adduser
ubuntu@pi3HAProxy:~$ sudo useradd -u 1026 -m -s /bin/bash alexlai
ubuntu@pi3HAProxy:~$ sudo usermod -aG sudo alexlai
ubuntu@pi3HAProxy:~$ id alexlai
uid=1026(alexlai) gid=1026(alexlai) groups=1026(alexlai),27(sudo)
ubuntu@pi3HAProxy:~$ ls -l /home/alexlai/
ls: cannot open directory '/home/alexlai/': Permission denied
ubuntu@pi3HAProxy:~$ sudo ls -l /home/alexlai/
total 0
ubuntu@pi3HAProxy:~$ sudo ls -l /home/
total 8
drwxr-x--- 2 alexlai alexlai 4096 Jun 4 10:34 alexlai
drwxr-x--- 5 ubuntu ubuntu 4096 Jun 4 10:15 ubuntu
ubuntu@pi3HAProxy:~$ sudo passwd alexlai
New password:
Retype new password:
passwd: password updated successfully
- run update
alexlai@pi3HAProxy:~$ sudo apt update && sudo apt -y upgrade
- change time zone
alexlai@pi3HAProxy:~$ timedatectl
Local time: Tue 2024-06-04 11:09:26 UTC
Universal time: Tue 2024-06-04 11:09:26 UTC
RTC time: n/a
Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
alexlai@pi3HAProxy:~$ sudo timedatectl set-timezone Asia/Taipei
[sudo] password for alexlai:
alexlai@pi3HAProxy:~$ date
Tue Jun 4 19:09:57 CST 2024