Basic script to get some points right off the bat for Debian/Ubuntu images.
Unfinished and not fully tested
If the README file on the image has a list of authorized users, fill out the authorized-users.txt
file and make sure it isn't set to DISABLED
.
If the script asks for a "main user", that just is whatever one the image has you logged in as.
- Ask user for required services (FTP, SSH, cups (for printing), etc.)
- Colored Text (Errors, Warnings)
- Update repos and packages with
apt
- Enable Auto Updates
- Install/Enable UFW
- Install/Enable SSH.
- Disable root SSH login
- Update file names database
- Delete unwanted media files
- Disable anonymous FTP login
- Enable SSL for FTP
- Make
sudo
require authentication - Encrypt passwords
- Set good password policies (only applies to users created in the future)
- Remove unauthorized users
- Remove non-admins from
sudo
group - Ensure
/etc/shadow
and~/.bash_history
have secure file permissions. - Disable IPv4 forwarding.
- Remove unwanted/hacking software.
- Organize everything (impossible)
- Some other things probably