Cannot get root shell in new Libertine container
-
Using Pixel 3a, Release candidate channel, Settings.Updates says Ubuntu touch Version 9.
Just made a Libertine container through Settings.Libertine, default name, no password. Installed Libertine Tweak Tool, and used that to turn on Libertine Shell. The container ID when done is focal as shown by Settings.Libertine.
Went into terminal, and typed the command
lish focal
which gave me a prompt as follows.(focal)I have no name!@ubuntu-phablet:~$
So I exited and typed the command to get a root shell in the container
lirsh focal
which behaved exactly aslish focal
and did not give me a root shell.- How can I get a root shell?
- How do I fix the no username problem?
Thank you for considering my difficulties.
-
@nom said in Cannot get root shell in new Libertine container:
How can I get a root shell?
Try the info in this post for getting a (fake)root shell
-
@arubislander , I found that using
fakeroot
as in the post you linked does not give a working root shell, e.g.apt install nano
fails.Here's something that did apparently work. Below "
.........
" is an error messageconfig.py:91 WARNING _get_maliit_address_from_dbus(): org.freedesktop.DBus.Error.Noreply: Did not receive a reply. [...]
phablet@ubuntu-phablet:~$ sudo -E bash root@ubuntu-phablet:~# lish focal .......... (focal)root@ubuntu-phablet:~#
Using this
apt install nano
worked, as didapt remove nano
.Using this
su phablet
indicates the user named phablet does not exist in the container. So I will attempt to add it with uid 32011 as associated with the missing name in the post you linked. -
@nom
strange, on xperia x (focal) stable (OTA-3) it worked for me with a new focal container:
(I used the name focal2 because I have a focal container already)phablet@xperia:~$ libertine-container-manager create -i focal2 -t chroot ... phablet@xperia:~$ libertine-container-manager exec -i focal2 -c "/bin/bash" groups: cannot find name for group ID 32011 I have no name!@xperia:~$ fakeroot groups: cannot find name for group ID 32011 root@xperia:~# apt install nano ... (installs without error)
as mentioned in the post the missing id problem is solved by adding
extrausers
to the first 4 lines of/etc/nsswitch.conf
within the containerpasswd: files systemd extrausers group: files systemd extrausers shadow: files extrausers gshadow: files extrausers
it could be that this only works for libertine containers of type chroot. I've updated the command above accordingly.
-
@chris Sorry for the stupid question, but I need help. How do I edit the /etc/nsswitch.conf file?
I use the fakeroot command, then:
nano /etc/nsswitch.conf
The editor says "file unwritable".
What am I doing wrong?And second question I can't find how I can type ยซctrl+oยป on my phone keyboard ?
-
@Georg I had similar problems with Libertine.
Instead of editing the file from "within" the chroot, i just edited it from outside (as the user "phablet"):
nano /home/phablet/.cache/libertine-container/focal/rootfs/etc/nsswitch.confalso I highly recommend using the ADB Shell or SSH
-