Some beginner questions...

Ben Cooksley bcooksley at kde.org
Sat Mar 5 18:11:53 GMT 2022


On Sun, Mar 6, 2022 at 6:17 AM Alexander Neundorf <neundorf at kde.org> wrote:

> On Sonntag, 21. November 2021 21:38:14 CET Albert Astals Cid wrote:
> > El diumenge, 21 de novembre de 2021, a les 18:20:08 (CET), Alexander
> Neundorf va escriure:
> ...
> > > Is there a reason why less, vi and mc are not part of the image ?
> > > They make working in the container much nicer :-)
> >
> > You can always
> >   sudo apt install vim
> > no?
>
> I get errors:
> I have no name!@8fdf0c048ce2:~$ sudo apt-get install vim
> sudo: you do not exist in the passwd database
> I have no name!@8fdf0c048ce2:~$


If you'd like to be root then something like this should work:

docker exec -u root $containerId /bin/bash

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.
The Android SDK image should spawn a shell as 'user' (UID 1000)


>
>
> When mounting /etc/passwd into the container I get the following:
>
> alex at 792716dfb133:~$ sudo apt-get install vim
> [sudo] password for alex:
> Sorry, try again.
> [sudo] password for alex:
> Sorry, try again.
> [sudo] password for alex:
> sudo: 3 incorrect password attempts
>

You will need to mount /etc/shadow in as well for your password to come
through.
I wouldn't recommend mounting either file into the container though.


>
> When also mounting my /etc/sudoers into the container, I get a parsing
> error
> from sudo, probably because Ubuntu sudo is slightly different from
> OpenSUSE
> sudo ?
>
> What's the recommended way to do that ?
>
> Thanks
> Alex
>

Cheers,
Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-android/attachments/20220306/8c008ee3/attachment.htm>


More information about the KDE-Android mailing list