shadow
- Explicitly specify 
--bindir faillogfailed login attempts for existing usersbtmplists every failed login attempt- Create a 
~/.hushloginfile to disableNo mail.message fromlogin(lib/mail.c) - Disable 
auditsupport because it goes inline with utmp as it grants the ability to monitor users and failed logins and such - Disable 
logindbecauseshadowswitched tosystemdto provide utmp-like functionality - Disable 
subecause the user should usesudoordoasto escalate privileges and notsudirectly; also recommended by the Arch wiki Security page - shadow advises against using their 
suand recommends usingutil-linux’ssuinstead (which requires PAM) - Prefer 
shadowbinaries overtoyboxorutil-linuxsimilar to Alpine and Arch and unlike LFS idandgroupsfrom shadow are deprecated as of 4.17.0- Enable 
fcapsfor better security innative(requiresroot) - Enable 
yescryptfor better password hashing scalability - The default value for 
--with-group-name-max-lengthis32 - When linking against 
nsssshadow tries to link againstxget*functions that are used with PAM, even though--without-pamis being used andlogin_nopamis being built - Enable shadowed passwords by running 
pwconvpost install - Enable shadowed group passwords by running 
grpconvpost install suloginis being built, but not installed- Builds 
login_nopamcorrectly, but attempts to link xget pam when usingnssspatch - Check 
/etc/login.defsfor mail stuff and others src/useradd.ccan be patched to change default values; users can still use/etc/default/useraddto modify these valuesINACTIVEis set to-1by defaultEXPIREis empty by default/etc/default/useraddpermissions600- The following utilities can be configured to be built without PAM:
 
- chfn- chpasswd- chsh- getsubids- groupmems- login- newusers- passwdCommon Binaries
Section titled “Common Binaries”Comparison of different implementations of the same tools by shadow and util-linux:
- Prefer 
shadow’schfn: util-linux version requires PAM - Prefer 
shadow’schsh: util-linux version requires PAM - Prefer 
shadow’slogin: util-linux version requires PAM - Prefer 
shadow’snewgrp: no flag to disable it fromshadow, alsoutil-linuxversion needs to be explicitly enabled - Prefer 
shadow’snologin: no flag to disable it fromshadow - sg (is just a symlink to newgrp)
 - vigr (is just a symlink to vipw)
 - Prefer 
shadow’svipw: no flag to disable it fromshadow, alsoutil-linuxversion needs to be explicitly enabled - Prefer 
util-linux’ssulogin:shadow’ssuloginlacks options and is not installed by default - Prefer 
toybox’ssu: bothshadowandutil-linuxversions requirepam shadowuses file capabilities over suid; consider that forseatd?