termux / proot

An chroot-like implementation using ptrace.
https://wiki.termux.com/wiki/PRoot
Other
775 stars 160 forks source link

Cannot create a new user account in Ubuntu hirsute (using DISTRO_ARCH="arm" or linux32 proot-distro) #191

Closed WheezyE closed 3 years ago

WheezyE commented 3 years ago

Problem description

Whenever I try to create a new user account in Ubuntu hirsute in 32-bit mode (arm) I get

Adding new group `user' (1000) ...
groupadd: /etc/group.15184: lock file already used
groupadd: cannot lock /etc/group; try again later.
adduser: `/sbin/groupadd -g 1000 user' returned error code 10. Exiting

I also can't use sudo (tty errors).

This behavior didn't exist in Ubuntu-20.04, where I could create user accounts under 32-bit mode.

I asked about this in https://github.com/termux/proot-distro/issues/159, but xeffyr suggested I ask @michalbednarski about it here. They suggested "the latest Ubuntu version use newer syscalls in glibc or somewhere else and proot really need a fix. There are chances that other distributions soon will be affected as well."

Steps to reproduce

In a fresh Termux install, I installed proot-distro, ran cp $PREFIX/etc/proot-distro/ubuntu.sh $PREFIX/etc/proot-distro/ubuntu-32bit.sh and then edited ubuntu-32bit.sh so that DISTRO_ARCH="arm" was at the top, then ran proot-distro install ubuntu-32bit which successfully installed the 32bit armhf packages. When I log into proot though with proot-distro login --isolated ubuntu-32bit and run try to create a user account, I get the errors.

I have also tried

pkg install proot-distro git -y
linux32 proot-distro install ubuntu
proot-distro login --isolated ubuntu
# In proot:
adduser user

(though xeffyr suggested that linux32 proot-distro install ubuntu is not a recommended method for installing proot-distro's)

Expected behavior

User account creations used to work in Ubuntu-20.04

Additional information

Termux fresh install from F-Droid, installed today. My goal is to run box86 (not qemu) on armhf Termux Ubuntu proot.

~ $ termux-info
Application version:
0.117
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages.termux.org/apt/termux-main/ stable main
# science-repo (sources.list.d/science.list)
deb https://termux.mentality.rip/termux-science science stable
# game-repo (sources.list.d/game.list)
deb https://termux.mentality.rip/termux-games games stable
Updatable packages:
All packages up to date
Android version:
9
Kernel build information:
Linux localhost 4.4.146+ #1 SMP PREEMPT Sat Apr 24 02:53:11 UTC 2021 aarch64 Android
Device manufacturer:
Amazon
Device model:
KFTRWI
ghost commented 3 years ago

could be https://github.com/termux/proot/issues/151

michalbednarski commented 3 years ago

Ok, I've just fixed it, update should be available in Termux apt repo as proot 5.1.107-44

WheezyE commented 3 years ago

Thank you very much! User account creation in 32-bit (arm) Ubuntu-hirsute proot is now working