Is there any way to reset all passwords previously created when the secondary password file is enabled for the first time to ensure higher-level protection ?.
1 Answer
You can choose to expire all user accounts with a loop using the passwd
command, forcing them to change their password on next login. Avoid this on system accounts. Eg, user accounts on Linux Debian based systems start at uid 1000. Most system accounts have a disabled password anyway.
From man passwd
:
-e, --expire
Immediately expire an account's password. This in effect can force a user to change his/her password at the user's next login.
There are other related options to take care about (like -i, --inactive
which might later disable such accounts).
Use a loop iterating on users (eg using contents of /etc/passwd
or more generic using getent passwd [someuser]
/etc/shadow
or are you talking about something else?