[No audio]
Changing password. In this lesson, we will cover
how you could change the user password. Either you
are root and you force the user to change the
password 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 login. 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 that command is passwd is followed by
the userid. The password is not the entire word
is just passwd. It does not have o and r in
it. So it's passwd userid and userid in
my case is iafzal. When 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 it will 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 that they
asked 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 passwd
while you are root, remember, it will
change your root password. If you type passwd
followed by userid, then it will change the
password of that user. So let's log into our Linux
machine through console and see how we could
change our user password.
[No audio]
Here we have our Linux
machine console, I'll just do a right click and
open the terminal. I always like to make this
terminal a lot bigger, make the window 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
passwd, followed by my userid it says, Only
root can specify a user name. So only root has
the rigth to specify the username. I'm not root, I'm
being myself, who am I, whoami, I am myself, so all I
will do is just put in just passwd command, not
the username, I would hit enter and now it's
asking me to change or to provide my current
password. So I'm going to put in my current
password. Now it's asking me for a new password.
Now remember I'm gonna put in, this I'm just gonna
put it 1234. And let's see what it says. It says, The
password is shorter than 8 characters. So
let's put in 12345678 and it says, The password fails
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, of course to see if that word exists or not.
So make sure you change you change the password to
something that does not go with dictionary. I'm
gonna change it to something different. There you
go, see it took it. I'm going to reconfirm it and
passwd: all authentication tokens updated
successfully. So that's this command to change the
password, and I want you to try that command, try
couple of different types, different ways,
become root and change your password by typing
passwd iafzal, your username, and then login
as yourself and try that command.
[No audio]