Why/When to use passwd -d?

Hello Friends

According with man passwd exists the following information:

-d, --delete
 Delete a user's password (make it empty).
 This is a quick way to disable a password for an account.
 It will set the named account passwordless.

For experimental purposes was created a test user as sudo adduser testuser and later was executed the following command:

  • sudo passwd -d testuser

Therefore the su - testuser works without requesting any password as expected

Just being curious, if this approach exists, is because exists at least one reason to accomplish this approach. Therefore

Question

  • Why/When to use passwd -d?
1 Like