This is a basic sercurity setup guide is for the initial deployment of a Raspberry Pi OS (ARM64) image.
You can obtain the latest copy of Raspberry Pi OS here:
Change the Default User/Password
- To change the password for the current user, enter the following command:
- Create a new user:
- Add permissions/groups for new user:
- To add all the same settings and groups as the default
pi user, enter the following command,
sudo usermod -a -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,netdev,gpio,i2c,spi <username>
Reboot and login as the new user
Remove the defualt Pi user:
- Remove the
pi user home folder:
sudo deluser -remove-home pi
Make sudo require a Password
- Open the following file to edit:
sudo visudo /etc/sudoers.d/010_pi-nopasswd
- Change the entry to:
pi ALL=(ALL) PASSWD: ALL
Change the Hostname
- Open the Raspberry Pi Software Configuration Tool (raspi-config),
Selecct ‘System Options’ > ‘Hostname’
Follow the prompts to set a new, unique hostname.
Select ‘Finish’ and reboot if prompted to apply the changes.