How to Change Password in Linux
User management is something very important in linux system. In linux, there is a kind of system that you would not find in other operating system, the system is called "user group". This kind of system will determine the privilege of each linux user, for instance a linux user that has not assign as part of www group would never able to access the file that has a www group limitation. Well that's a very though explanation, now lets take a look, what if, you want to change your user password in linux which by default is passwordless? well in the next part of this article we will explain about how to change your password from linux terminal.
Before i show how to change your password, you must check which user you currently logged in, to check the user, you can enter this command on your terminal:
id
here is the result :
Now lets go a head changing the password for this user. first u need to login as an administrator, to log in with super user, you can type this command in linux terminal:
now retype the password that you already enter,
How to Change Linux Password
Before i show how to change your password, you must check which user you currently logged in, to check the user, you can enter this command on your terminal:
id
here is the result :
user@asus:~$ idBase on the result, we got a new information that the user i currently logged in is "user".
uid=1000(user) gid=1000(user) groups=1000(user),4(adm),20(dialout),24(cdrom),27(sudo),30(dip),46(plugdev),115(lpadmin),131(sambashare)
Now lets go a head changing the password for this user. first u need to login as an administrator, to log in with super user, you can type this command in linux terminal:
sudo -iand here is the result:
[sudo] password for user:
root@asus:~#
Now lets change the password of user, to change password of a user you can use "passwd" command, you need to enter this command:
passwd user
now the system will ask you to enter the unix password, all you need to do is just enter the new password you want to use:
[sudo] password for user:
Enter new UNIX password:
Retype new UNIX password:and here is the result:
user@asus:~$ sudo passwd elbirtus
[sudo] password for user:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
From the result, we just successfully change the password of the user. this is becoming really important to change your password regularly because it can give you a lot of benefit to prevent you from hacking or hijacking on your server.
awesome tutorial :D
BalasHapus