Tested with Raspbian and RetroPie distributions. No additional packages are required to be installed.
Download and save the pistats.sh
script to the /etc/profile.d/ folder on your Raspberry Pi then follow the steps below.
- Change owner to root.
sudo chown root:root /etc/profile.d/pistats.sh
- Make the script executable.
sudo chmod +x /etc/profile.d/pistats.sh
- Remove the existing message of the day.
sudo rm /etc/motd
- Disable the last login information from the sshd service.
sudo nano /etc/ssh/sshd_config
- Uncomment the line 'PrintLastLog yes' and change it to 'PrintLastLog no' - Disable the system information line.
sudo nano /etc/update-motd.d/10-uname
- Comment out the line 'uname -snrvm' - If installing on RetroPie, remove the existing MOTD.
sudo nano ~/.bashrc
- Comment out the second last line 'retropie_welcome' - Change the logo to the RetroPie, PiHole or PiStick variations by commenting or renaming the default Ras-Pi logo and uncommenting the logo of your choice.
- Reboot the Pi
sudo reboot
- For the UFW status to run without a sudo password, add a new sudoers file
sudo nano /etc/sudoers.d/ufwstatus
- Add the following two lines
Cmnd_Alias UFWSTATUS = /usr/sbin/ufw status
%ufwstatus ALL=NOPASSWD: UFWSTATUS
- Create a group for the users
sudo groupadd -r ufwstatus
- Add your users to the group
sudo gpasswd --add pi ufwstatus