Showing posts with label passwd. Show all posts
Showing posts with label passwd. Show all posts

Thursday, October 20, 2016

Change the Password of Any Linux User from the Terminal on Linux

If you're a system administrator and you want to change the password of a user of your Linux system, follow this tutorial.

Let's say I have a user 'linda' on my system. I want to change the password of linda. I would run the following command,

sudo passwd linda
Changing password for shovon.
(current) UNIX password:

Enter your current accounts password and press <Enter>. Then you will see the following prompt:

Enter new UNIX password: 

Enter the password that you want 'linda' to have and press <Enter>, Then you will see the following prompt:

Retype new UNIX password: 

Retype the new password for 'linda' and press <Enter>. You will see the following line.

passwd: password updated successfully 


Congrats! You have successfully changed the password of 'linda' from Linux terminal.

Change Your Password on Linux

If you want to change your password from the terminal on Linux, follow this tutorial.

To change your password on linux, run the following command

passwd
Changing password for shovon.
(current) UNIX password:

Enter your current accounts password and press <Enter>. Then you will see the following prompt:

Enter new UNIX password: 

Enter the password that you want your account to have and press <Enter>, Then you will see the following prompt:

Retype new UNIX password: 

Retype your new password and press <Enter>. You will see the following line.

passwd: password updated successfully 


Congrats! You have successfully changed your password from Linux terminal.

Enable root account on Linux

To enable root account, you must have administrative privileges. Usually what that means is, you must be a sudoer. sudoers can run sudo command.

To enable root account run the following command,

sudo passwd
[sudo] password for shovon: 

Enter your current accounts password and press <Enter>. Then you will see the following prompt:

Enter new UNIX password: 

Enter the password that you want root account to have and press <Enter>, Then you will see the following prompt:

Retype new UNIX password: 

Retype the root password and press <Enter>. You will see the following line.

passwd: password updated successfully 


Congrats! You have successfully enabled root account.

Change root Password of Linux

To change the root password run the following command,

sudo passwd
[sudo] password for shovon: 

Enter your current account's password and press <Enter>. Then you will see the following prompt:

Enter new UNIX password: 

Enter the password that you want root account to have and press <Enter>, Then you will see the following prompt:

Retype new UNIX password: 

Retype the root password and press <Enter>. You will see the following line.

passwd: password updated successfully 


Congrats! You have successfully changed the root password.

Saturday, October 15, 2016

Unlock User Account (Enable User Login) on Linux

To unlock a user account that has been locked on linux, you can use the passwd command.

The command is,

sudo passwd -u username

For example, to unlock the user 'linda', so 'linda' can login to the system again,

sudo passwd -u linda
Unlocking password for user linda.
passwd: Success

Now you can try to login as 'linda' and you will see that login is working again.

Disable User Login (Lock Password) on Linux

To lock a user account on linux, you can use the passwd command.

The command is,

sudo passwd -l username

For example, to lock the user 'linda', so 'linda' can not login to the system anymore,

sudo passwd -l linda
Locking password for user linda.
passwd: Success

Now you can try to login as 'linda' and you will see that you login is disabled.