Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

which unix or linux command is used to change root password of remote machine(Just an IP address)?

Suppose I just have an IP address of the target machine which is on my network, But I do not know root password of this machine, Is there any command available in Linux or unix that allow me to change root password that target machine, So that after changing the root password of the target machine I can do ssh to login into the target machine with new root password.

share|improve this question

You are talking about "ethical hacking". Fine, if I had set up my machine so badly that I allowed a malicious user to change the root password, it would be nice to have a way to fix it.

The problem is that there is no way to recognize that I am the owner and have the right to do so. What you are suggesting would render the entire concept of user security pointless. How is the system supposed to know that you are an "ethical hacker"? You are asking for a magic command that simply ignores security. That is just about the most insecure system I can imagine, it is the equivalent of giving a guest user root access.

There is no such command and there never will be any such command. It is your responsibility as a sysadmin to make sure nobody can get access to your machine. The only way to change the root password is to know the root password.

share|improve this answer
or to have physical access (i.e. root). – strugee Mar 30 '14 at 23:47

No, there isn't. Just think about it – if such a command existed, it would be a really serious security problem.

share|improve this answer
I know it is more about security , But consider it in term of ethical hacking , Suppose we get news about breach or leakage of root password and someone already changed it, and now he is owning my system. Now I want to get back my system by applying same concept to change root password and then gain access to it back. – Sunil Singh Mar 29 '14 at 18:26
@SunilSingh: If it's your system, obtain physical access and reboot into some sort of recovery mode. – grawity Mar 29 '14 at 18:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.