Add this one as
/etc/cron.daily/diversity to give your users the diversity
they so rightly deserve.
What it does
This will once a day change the default shell of every local account to a random shell selected from all the installed/allowed shells on the system.
Bonus points for remembering that
/sbin/nologin is also a allowed shell.
Why it works
- Line 2 loops over every username in
sort -Rrandomizes the order of lines in a file to stdout
head -n1grabs the first line of the randomized list of shells.
chsh -sset the default shell for a user.
- Properly functioning user shells
/sbin/nologinas shell for system service accounts
- Expected behaviour