Closed 7yl4r closed 7 years ago
Hi Tyler,
I manually added users to mbon and the rstudio-shiny (yes, now combined so geospatial libraries available to shiny) so got wiped when reinstalled docker. Trying to use newusers
to create update easily.
Related issues:
It's a bit verbose, but I guess you could do it manually for the users you want right?
mkdir migrate_usr
cd migrate_usr
for usr in ('tylarmurray' 'otheruser' 'otherotheruser') do
grep $usr /etc/passwd >> passwd
grep $usr /etc/group >> group
grep $usr /etc/shadow >> shadow
grep $usr /etc/gshadow >> gshadow
done
then move it to the container scp migrate_usr ben@docker_container:.
, make back ups just in case and then append stuff in the container
mkdir newsusers.bak
cp /etc/passwd /etc/shadow /etc/group /etc/gshadow newsusers.bak
cd migrate_usr
cat passwd >> /etc/passwd
cat group >> /etc/group
cat shadow >> /etc/shadow
cat gshadow >> /etc/gshadow
Or do you want logins to be synced across the docker host and container? I might be able to hook mbon and the shiny container into our LDAP server, but maybe that is overkill on this.
Hi Tylar,
Thanks for these! I don't follow scp migrate_usr ben@docker_container:.
. Since the /mbon
volume is shared by the server mbon and all the docker containers, I just used the same R script to iterate through a users.txt
file to use with newusers
, which you can see at /mbon/admin/add_users.R
and run with:
sudo Rscript /mbon/admin/add_users.R; cat /etc/passwd
Because of Bug #1266675 “newusers error adding more than one user” : shadow package : Ubuntu, I had to iterate per user but could at least feed the password without prompting.
You should be able to login again to http://mbon.marine.usf.edu:8787 as tylarmurray
Nice! Docker is still a bit mysterious to me.
I'll test this out Monday. Thanks!
On Fri, Jul 28, 2017, 7:26 PM Ben Best notifications@github.com wrote:
Closed #23 https://github.com/marinebon/sdg14/issues/23.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/marinebon/sdg14/issues/23#event-1184315727, or mute the thread https://github.com/notifications/unsubscribe-auth/ABAK_uNK4yHzUIlhCb7LiSMV6JxSt-N5ks5sSm4XgaJpZM4Omu_T .
hmm. Can't log into rstudio
...but... also can't ssh into the mbon server anymore
me@local:~$ ssh tylarmurray@mbon
tylarmurray@mbon's password:
Permission denied, please try again.
Hi @7yl4r,
Just sent you the password I used for your account on both mbon server and rstudio-shiny docker.
thanks! :+1:
I had some spare time today and wanted to (finally) log into rstudio and poke around a bit, but found that I couldn't get in.
I poked around a bit on the server to see if I could troubleshoot it, but had no luck. Is Rstudio running on the VM directly or within one of the docker containers? Maybe within rstudio-shiny... but I thought the shiny container was separate?