CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.com] root in openfoam docker (https://www.cfd-online.com/Forums/openfoam-installation/166628-root-openfoam-docker.html)

jeremy rutman February 13, 2016 14:18

root in openfoam docker
 
I pulled the openfoam docker, which is built on centos which i'm not familiar with (I am an ubuntu user) . 'sudo' isn't recognized nor are my usual texteditors (nano, emacs) , nor can i install with yum without being root....so unless someone has some way out I guess I will just install on the metal and skip the docker which otherwise seems like a nice idea.

rcastilla February 22, 2016 09:45

It seems that you can access to root with the same password as the root acount in your local linux system.

It worked for me.

Regards

Robert

shangyan April 5, 2016 07:50

Quote:

Originally Posted by jeremy rutman (Post 585047)
I pulled the openfoam docker, which is built on centos which i'm not familiar with (I am an ubuntu user) . 'sudo' isn't recognized nor are my usual texteditors (nano, emacs) , nor can i install with yum without being root....so unless someone has some way out I guess I will just install on the metal and skip the docker which otherwise seems like a nice idea.

Hi,jeremy rutman
start your system in virtual box.run "passwd".It will require a new password, set one.Start your Docker and openfoam.Type su and input the password you set.

MakisH October 24, 2017 07:31

I tried OpenFOAM v1706 on Ubuntu 16.04, using the Docker-installation method, which is based on the installOpenFOAM and a startOpenFOAM scripts.

A workaround I found to login as root inside was to edit the startOpenFOAM script and modify:

Code:

docker exec -it of_v1706 /bin/bash -rcfile /opt/OpenFOAM/setImage_v1706.sh
to this (i.e. add the "-u 0"):

Code:

docker exec -u 0 -it of_v1706 /bin/bash -rcfile /opt/OpenFOAM/setImage_v1706.sh
I then ran the startOpenFOAM script as my normal user and I was logged in as root.


All times are GMT -4. The time now is 15:39.