Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Reset root password on docker sandbox

avatar

I have changed the root password for docker sandbox which I have forgotten now. How can I reset it?

1 ACCEPTED SOLUTION

avatar

sudo docker exec -i <container-id-or-name> passwd

View solution in original post

4 REPLIES 4

avatar

@milind pandit

Follow the instructions in this article:

https://linuxconfig.org/recover-reset-forgotten-linux-root-password

When you get to the step with the mount instruction use

mount -rw -o remount /-

avatar

sudo docker exec -i <container-id-or-name> passwd

avatar
Contributor

Switch to virtualbox/vmware console :

13641-d0.png

and logon to this console with username/password as root/hadoop (default)

13642-d1.png

on root prompt type

docker exec -i sandbox passwd and type the new password. as shown in this picture

13643-d2.png

Now go to browser and access the shell with new password

13644-d3.png

or do ssh root@localhost -p 2222 and keyin new password set in above screen.

you can use putty from windows machine and run any hdfs command.

13645-d4.png

avatar
New Contributor

I have tried this command in 2.6 version unsuccessfully but successfully with "sandbox-hdp" container.

docker exec -i sandbox-hdp passwd

After introducing password twice you have to finish with ^C.

Best regards

Emilio