1

what option should I add to my useradd command such that when the user logs in for the first time he's prompted to change the password or something?

I was thinking about this, but not sure if it's the right option:

useradd -K PASS_MAX_DAYS=0 username 

2 Answers 2

2

I use the passwd command to expire a password after setting it.

passwd -e

2

The command

chage -d 0 user01 

forces the user01 to update its password on the next login.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.