Even though I assume that anyone who tinkers with a Linux system knows what he/she is doing, a few words of caution about security can’t hurt, right? Don’t be like me, who used sudo in all examples. 😉
File permissions
Know your rights …
Password security
• NEVER store passwords in bmus.conf
• Use only .bmus_credentials for credentials
• Check permissions regularly:
ls -la /home/user/.bmus_credentials
# Should show: -rw------- (600)
sudo rights
The script requires sudo for:
• NAS mount / umount
• Access to system directories (/etc or /usr/local/bin)
• Email delivery via msmtp
Recommendation: Passwordless sudo access for specific commands:
sudo visudo
Add:
user ALL=(ALL) NOPASSWD: /bin/mount, /bin/umount, /usr/bin/msmtp