termux-packages icon indicating copy to clipboard operation
termux-packages copied to clipboard

[Bug]: adduser: permission denied (debootstrap)

Open Vini182837 opened this issue 1 year ago • 5 comments

Problem description

Hello, I'm having a problem regarding Debian, to be more specific, I'm having a problem with the Debian Adduser package, I'm trying to create a user with root permissions but the adduser output says 'permission denied', I will leave a step-by-step guide to executing the error. Here is a print 👇

Screenshot_2024-10-19-15-36-20-214_com termux

What steps will reproduce the bug?

  1. Pkg install debootstrap
  2. Debootstrap --arch arm64 stable debian http://ftp.us.debian.org/debian
  3. Run proot to get into debian
  4. Finally, execute adduser 'your username'

What is the expected behavior?

Adduser should ask you to enter a password, but it doesn't.

System information

I can't use 'termux-info' inside a proot distro and also I'm not using proot-distro but anyway:

Termux Variables:
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP__APK_FILE=/data/app/~~Oe2AephAkya7I1soX-rokg==/com.termux-Ek5q9DDD4E0aoG1qDhPWIg==/base.apk
TERMUX_APP__APK_RELEASE=F_DROID
TERMUX_APP__APP_VERSION_CODE=1020
TERMUX_APP__APP_VERSION_NAME=0.119.0-beta.1
TERMUX_APP__DATA_DIR=/data/user/0/com.termux
TERMUX_APP__IS_DEBUGGABLE_BUILD=false
TERMUX_APP__IS_INSTALLED_ON_EXTERNAL_STORAGE=false
TERMUX_APP__PACKAGE_NAME=com.termux
TERMUX_APP__PID=20753
TERMUX_APP__TARGET_SDK=28
TERMUX_VERSION=0.119.0-beta.1
TERMUX__SE_FILE_CONTEXT=u:object_r:app_data_file:s0:c166,c258,c512,c768
TERMUX__SE_INFO=default:targetSdkVersion=28:complete
TERMUX__SE_PROCESS_CONTEXT=u:r:untrusted_app_27:s0:c166,c258,c512,c768
TERMUX__UID=10678
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages-cf.termux.dev/apt/termux-main stable main
Updatable packages:
apt/stable 2.8.1-1 aarch64 [upgradable from: 2.7.14]
bash/stable 5.2.37 aarch64 [upgradable from: 5.2.26-1]
ca-certificates/stable 1:2024.09.24 all [upgradable from: 1:2024.03.11-2]
command-not-found/stable 2.4.0-46 aarch64 [upgradable from: 2.4.0-29]
coreutils/stable 9.5-3 aarch64 [upgradable from: 9.5]
curl/stable 8.10.1-1 aarch64 [upgradable from: 8.8.0]
debianutils/stable 5.20 aarch64 [upgradable from: 5.19]
dpkg/stable 1.22.6-1 aarch64 [upgradable from: 1.22.6]
findutils/stable 4.10.0 aarch64 [upgradable from: 4.9.0-2]
gpgv/stable 2.4.5-2 aarch64 [upgradable from: 2.4.5-1]
less/stable 661 aarch64 [upgradable from: 633-1]
libandroid-support/stable 29 aarch64 [upgradable from: 28-3]
libassuan/stable 2.5.7-1 aarch64 [upgradable from: 2.5.7]
libc++/stable 27b aarch64 [upgradable from: 26b]
libcurl/stable 8.10.1-1 aarch64 [upgradable from: 8.8.0]
libgcrypt/stable 1.11.0 aarch64 [upgradable from: 1.10.3]
libgpg-error/stable 1.50 aarch64 [upgradable from: 1.49]
liblz4/stable 1.10.0 aarch64 [upgradable from: 1.9.4]
liblzma/stable 5.6.3 aarch64 [upgradable from: 5.6.2]
libnettle/stable 3.10 aarch64 [upgradable from: 3.9.1]
libnghttp2/stable 1.63.0 aarch64 [upgradable from: 1.62.1]
libnghttp3/stable 1.6.0 aarch64 [upgradable from: 1.3.0]
libsmartcols/stable 2.40.2-1 aarch64 [upgradable from: 2.39.3-4]
libssh2/stable 1.11.1 aarch64 [upgradable from: 1.11.0]
libtirpc/stable 1.3.6 aarch64 [upgradable from: 1.3.4-1]
libunbound/stable 1.22.0 aarch64 [upgradable from: 1.20.0]
libunistring/stable 1.3 aarch64 [upgradable from: 1.1]
nano/stable 8.2 aarch64 [upgradable from: 8.0]
ncurses/stable 6.5.20240831-1 aarch64 [upgradable from: 6.4.20231001-4]
openssl/stable 1:3.3.2 aarch64 [upgradable from: 1:3.2.1-1]
patch/stable 2.7.6-4 aarch64 [upgradable from: 2.7.6-3]
readline/stable 8.2.13 aarch64 [upgradable from: 8.2.10]
termux-am/stable 0.8.0-1 all [upgradable from: 0.8.0]
termux-keyring/stable 3.12-1 all [upgradable from: 3.12]
termux-tools/stable 1.44.1 all [upgradable from: 1.42.4]
util-linux/stable 2.40.2-1 aarch64 [upgradable from: 2.39.3-4]
xz-utils/stable 5.6.3 aarch64 [upgradable from: 5.6.2]
zstd/stable 1.5.6-2 aarch64 [upgradable from: 1.5.6]
termux-tools version:
1.42.4
Android version:
12
Kernel build information:
Linux localhost 4.14.190-perf-gd04947a26e35 #1 SMP PREEMPT Tue May 16 10:19:50 CST 2023 aarch64 Android
Device manufacturer:
Xiaomi
Device model:
Redmi Note 9S
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.api versionCode:51
com.termux.x11 versionCode:15
com.termux.window versionCode:15

Vini182837 avatar Oct 19 '24 18:10 Vini182837

termux-info is termux command, it is not related to proot. Fill system information field as we expect it please.

twaik avatar Oct 19 '24 18:10 twaik

Try to remove your debootstrapped environment and start over. On the screenshot we can see it is not your first attempt to create this user and it produces another error, not the primary error that caused it.

twaik avatar Oct 19 '24 18:10 twaik

I've tried that, it's still the same

Vini182837 avatar Oct 19 '24 19:10 Vini182837

You still should fill system information field...

twaik avatar Oct 19 '24 19:10 twaik

I tried other solutions on the internet but nothing works, I have no doubt, either the problem is in debootstrap or in termux or I need to do something to make it work

Vini182837 avatar Oct 19 '24 20:10 Vini182837

Updates: finally after researching a basic debian setup from debootstrap I solved the problem. It turns out I needed to reinstall the passwd package using apt reinstall passwd. Theoretically it was a problem with the symbolic links or simply the package was incomplete. I don't know why it only worked by reinstalling passwd, but at least the problem was solved, I think.

Vini182837 avatar Nov 06 '24 23:11 Vini182837

Updates: finally after researching a basic debian setup from debootstrap I solved the problem. It turns out I needed to reinstall the passwd package using apt reinstall passwd. Theoretically it was a problem with the symbolic links or simply the package was incomplete. I don't know why it only worked by reinstalling passwd, but at least the problem was solved, I think.

I'm just here to say Thank you. I have the exact same issue!

Pkaster avatar Dec 21 '25 18:12 Pkaster