Promoting Diversity
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
/etc/passwd
sort -R
randomizes the order of lines in a file to stdouthead -n1
grabs the first line of the randomized list of shells.chsh -s
set the default shell for a user.
TL;DR
- Properly functioning user shells
-
/sbin/nologin
as shell for system service accounts - Expected behaviour
- Fun