Changing password in this lesson, we will cover how you can change the use of password, either you
are rude and you forced the user to change the password for the first time you log in or if you are
just yourself and you want to change your own password, you should change your initial password as
soon as you log in.
Now this is when your account is created for the first time in the system and you log in with a password
that's been given to you.
Or sometimes what happens is a password is not given to you.
You would just log in with your username, and it will automatically prompt you to put in a new password
to change a password.
The command is password, followed by the user ID.
The password is not.
The entire word is just p a s s w d.
It does not have or an R in it.
So it's password space, user ID and User ID, in my case is if so, then you hit enter.
It will ask you for your old password or your existing password that you have.
You provide that password.
The next thing I'll ask you is to put in your new password.
You input your new password.
It will reconfirm the new password for it, so it will ask you retype your new password.
The reason is to ask for the second time is because if you have made a mistake in your earlier entry
of adding new password, it will match to confirm that you have added the right password.
Now, if you just type paste w d while you are root, remember it will change your whole password.
If you type P as s w d followed by user ID, then it will change the password of the user.
So let's log in to our Linux machine through console and see how we could change our user password.
And we have our lengths, machine console or just to a right click and open the terminal.
I always like to make this terminal a little thicker, make the window a little bigger.
I could just simply drag and drop, or I could simply maximize it by clicking here.
Anyway, let's get into our changing password.
So when I type password lullaby by my user ID.
It says only route can specify a username, so only route has the right to specify the username.
I'm not rude.
I'm being myself, who am I?
Who am I?
I'm myself.
So all I would do is just put an just password command not to use any of it.
Hit enter.
And now it's asking me to change or to provide my current password.
So I'm going to put in my password.
Now it's asking me for your password.
Now, remember, I'm going to put in this time I'm just going to put in one two, three four.
And let's say what it says.
It says the password is shorter than eight characters, so let's put in one two three four five six
seven eight.
And it says password fields the dictionary check.
So now Unix, or most of the operating system nowadays have this check where it looks for a dictionary
and see if that password exists.
Let's see if that word exists or not.
So make sure you change.
You change the password to something that does not go with the dictionary.
So I'm going to change it to something different.
There you go, see, it took it.
I'm going to reconfirm it
and password authentication tokens updated successfully.
So that's the command to change the password, and I want you to try that command, try a couple of
different types, different different ways, become root and change your password by typing password.
I absolutely username and then log in as yourself and try that command.