0

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 ?.

2
  • 2
    Can you give more details about this secondary password file? is it /etc/shadow or are you talking about something else?
    – A.B
    Dec 26, 2018 at 13:10
  • Yes /etc/shadow only.
    – user328010
    Dec 26, 2018 at 14:10

1 Answer 1

0

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]

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .