xxxxxxxxxx
# To change your own password, run the following command and follow the prompts:
passwd
# To change another user's password (requires root/sudo privileges), use the following syntax:
sudo passwd username
# Replace 'username' with the actual username of the user for whom you want to change the password.
# You will be prompted to enter and confirm the new password.
xxxxxxxxxx
//open terminal and run this command
passwd
//It will require you to add current password first then updated password
xxxxxxxxxx
#if you dont't have your root password => then don't use sudo command
# passwd <username>
Current password:
New password:
Retype new password:
passwd: password updated successfully
xxxxxxxxxx
#To change password in linux
#Log in to the user and Type the following command.
passwd
xxxxxxxxxx
# Chpasswd command is very simple to use
[ root@myhost ~ ] # echo "tom:1234" | chpasswd
# Using the passwd command, you can also change the password in a batch like mode
[ root@myhost ~ ] # echo "1234" | passwd --stdin "tom"
Changing password for user tom.
passwd: All authentication tokens Updated successfully.