<div dir="ltr"><div dir="ltr">On Sun, Mar 6, 2022 at 6:17 AM Alexander Neundorf <<a href="mailto:neundorf@kde.org">neundorf@kde.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sonntag, 21. November 2021 21:38:14 CET Albert Astals Cid wrote:<br>
> El diumenge, 21 de novembre de 2021, a les 18:20:08 (CET), Alexander <br>
Neundorf va escriure:<br>
...<br>
> > Is there a reason why less, vi and mc are not part of the image ?<br>
> > They make working in the container much nicer :-)<br>
> <br>
> You can always<br>
>   sudo apt install vim<br>
> no?<br>
<br>
I get errors:<br>
I have no name!@8fdf0c048ce2:~$ sudo apt-get install vim<br>
sudo: you do not exist in the passwd database<br>
I have no name!@8fdf0c048ce2:~$</blockquote><div><br></div><div>If you'd like to be root then something like this should work:</div><div><br></div><div>docker exec -u root $containerId /bin/bash</div><div><br></div><div>Bit unusual that you have managed to get a shell as a user account that does not exist, by default both our SUSE CI images and the Android CI image should run shells as root.</div><div>The Android SDK image should spawn a shell as 'user' (UID 1000)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br>
<br>
When mounting /etc/passwd into the container I get the following:<br>
<br>
alex@792716dfb133:~$ sudo apt-get install vim<br>
[sudo] password for alex: <br>
Sorry, try again.<br>
[sudo] password for alex: <br>
Sorry, try again.<br>
[sudo] password for alex: <br>
sudo: 3 incorrect password attempts<br></blockquote><div><br></div><div>You will need to mount /etc/shadow in as well for your password to come through.</div><div>I wouldn't recommend mounting either file into the container though.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
When also mounting my /etc/sudoers into the container, I get a parsing error <br>
from sudo, probably because Ubuntu sudo is slightly different from OpenSUSE <br>
sudo ?<br>
<br>
What's the recommended way to do that ?<br>
<br>
Thanks<br>
Alex<br></blockquote><div><br></div><div>Cheers,</div><div>Ben</div><div> </div></div></div>