Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

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
Frequent Visitor

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 Member

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