Hortonworks sandbox reset root password tutorial
Hortonworks Hadoop distribution is enterprise ready Hadoop distribution and its sandbox is available for developers to explore it. In this tutorial we are going to teach you to reset the Hortonworks Hadoop sandbox default root password.
After installing Hortonworks Hadoop sandbox you should first reset/change the root password. Only after resetting the root password you will be able to login through ssh terminal and work easily. Without password reset it is not allowed to remotely connect to the Hadoop system.
This tutorial will guide you in resetting Hortonworks sandbox root password. The default password for the root user is:
Root username: root
Default password: hadoop
Steps to reset root password of Hortonworks Hadoop sandbox
Step 1: Start your Hortonworks Hadoop sandbox
Open Oracle VirtualBox and then select "Hortonworks Docker Sandbox HDP" as shown below:
Step 2: Start VM
Start the VM by clicking on the "Start" button of the Oracle VM VirtualBox Manager. It will start as shown below:
Step 3: Login to VM
Now once VM started, press Alt+F5 button to open login window as shown below:
Step 4: Enter login and password for login
Hadoop VM root password:
username : root password : hadoop
Now enter the login: root and password: hadoop and press enter button as shown below:
After successful login following console is displayed:
Step 5: Rest root password of Hortonworks sandbox
Now enter the following command and then
[root@sandbox-host ~] password
It will ask you to enter the new password and then confirm password. This way you can change password as shown below:
Step 5: Change Hortonworks sandbox docker container password
First you have to find out the docker id of Hortonworks sandbox with following command:
docker ps -a --no-trunc -q
Here is sample output of command:
docker ps -a --no-trunc -q 4274ccecf4809b5356ed........
Now you can use the following command to change the password of docker container:
sudo docker exec -i <container-id-or-name> passwd
Here you have to replace the value of -i, in our case it is 4274.
Here is full command:
sudo docker exec -i 4274 passwd
It will ask you to enter new password two times and then update the password as shown below:
0
Step 6: Login to docker sandbox
To work on the Hadoop you have to login to the docker sandbox and for this use the ssh tool. Here is the command to login to docker container:
ssh -p 2222 root@localhost
It will ask you the password for root. Enter the your password and press enter. After successfully login you can run the hdfs command: 1
hdfs dfs -ls /
Here the screen shot of the output:
2
In this tutorial we have discussed the process of resetting password in Hortonworks sanbox with detailed example. Visit our Hadoop Tutorials page to view and learn from large number of Hadoop tutorials.