I am trying to change password in Linux for root but it says I don’t have permission. How can I changing the root password for Linux by cmd? I try
$ passwd root
I am trying to change password in Linux for root but it says I don’t have permission. How can I changing the root password for Linux by cmd? I try
$ passwd root
For changing the toot password for Linux, follow these steps:
ssh user@server-ip
sudo passwd
OR
sudo passwd root
See my page for more info
https://www.cyberciti.biz/faq/linux-change-password/
You can use below command:
sudo passwd username
You can replace username with the name of user whose password you had to change.
Is your username is sudoers?
if not! Try to access the root by:
su -
Then enter the root password.
Now you are in root account! Change password by using:
passwd root #using without sudo is fine