In this video, you'll learn how to manage password properties.
We have already seen that hashes of encrypted passwords
are stored in ETC Shadow.
And the hash string contains three pieces of information.
First, there's a reference to the hashing algorithm.
Then there is a random salt, which
is some random data that has been
used to encrypt the passwords.
And then we have the encrypted hash of the user password.
It's a one-way algorithm.
So even if you can find it in ETC Shadow,
you can never calculate back the original password.
So how do we manage password settings?
Well, we have already seen some basic password requirements
in etclogin.dev.
We have also seen that for advanced password properties,
PAM can be used.
And you can look at the PAM fail log module if you want to.
But for RHCSA, most important is CHH or CHASE,
or however you want to pronounce it,
or use the password command as root.
Let's check it out.
So let me start by using CHASE on user Linda.
I like it because it's giving an interactive interface that's
prompting for all the different values.
So do we want the minimum password age?
No, not really.
Maximum password age, yeah, I want to set that to 270.
Last password change, that's a system setting
you shouldn't mess with it.
And password expiration warning, well,
I want this used to get a warning three days in advance.
Password inactive, no, it's not inactive.
And I don't want to expire the account.
This is the easiest way to change password properties
for existing users.
But you can also use command line parameters.
Have a look at them using CHASE minus minus help.
There you can see all of these options
as the command line parameter.
But again, I don't see why you wanted
to do that as a command line option,
because it only makes it more complicated.
And likewise for passwd.
You can also use passwd to set some properties for your user
password.
But I repeat my point, CHASE is probably the most easy way
to set parameters like the warning days,
and the maximum days, and so on.
So that's all you need to know about managing passwords.