Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

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 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 at 18:26
1  
@SunilSingh: If it's your system, obtain physical access and reboot into some sort of recovery mode. –  grawity Mar 29 at 18:45

Your Answer

 
discard

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.