nix-on-droid icon indicating copy to clipboard operation
nix-on-droid copied to clipboard

sudo

Open karim298 opened this issue 4 years ago • 4 comments

why sudo can't work Screenshot_20210518-144948

how to fix it?

karim298 avatar May 18 '21 13:05 karim298

Unfortunately, you do not have access to root user without a rooted phone.

Gerschtli avatar May 18 '21 14:05 Gerschtli

I have root

karim298 avatar May 18 '21 16:05 karim298

Then you are the first one to test this specific setup :)

I don't know if the proot'ed environment can handle the system root user. Another problem is probably the /etc/passwd which is currently staticly hardcoded. And for the sudo binary, there needs to be a wrapper similarly to https://search.nixos.org/options?channel=20.09&show=security.wrappers&from=0&size=50&sort=relevance&query=security I think. Feel free to hack around :)

Gerschtli avatar May 18 '21 19:05 Gerschtli

#3

The closest thing I've tested to work was to run the failsafe shell, then su, then enter Nix environment with /data/data/com.termux.nix/files/usr/usr/bin/login.

t184256 avatar May 18 '21 22:05 t184256