krmanik / Manjaro-Linux-on-Android

Install Manjaro on Android
75 stars 5 forks source link

$USER is not in the sudoers file. #16

Closed mrfoxie closed 2 years ago

mrfoxie commented 2 years ago

Screenshot_20220315-121511_Termux

after installing manjaro it gives this error on first boot while updating package

krmanik commented 2 years ago

The script is breaking somewhere. I will debug and fix it.

In meantime do following. From termux not in proot, edit sudoers file

  1. Change file permissions to write

    chmod +w manjaro/etc/sudoers
  2. Use nano or vim to edit

    nano manjaro/etc/sudoers
  3. Then add manjaro ALL=(ALL:ALL) in sudoers below root

    ##
    ## User privilege specification
    ##
    root ALL=(ALL:ALL) ALL
    ## Add this 
    manjaro ALL=(ALL:ALL)
  4. Revert file permissions

    chmod -w manjaro/etc/sudoers
  5. Then proot into manjaro and run the command, it will work

    sudo pacman -Syyy
mrfoxie commented 2 years ago

The script is breaking somewhere. I will debug and fix it.

In meantime do following. From termux not in proot, edit sudoers file

  1. Change file permissions to write
chmod +w manjaro/etc/sudoers
  1. Use nano or vim to edit
nano manjaro/etc/sudoers
  1. Then add manjaro ALL=(ALL:ALL) in sudoers below root
##
## User privilege specification
##
root ALL=(ALL:ALL) ALL
## Add this 
manjaro ALL=(ALL:ALL)
  1. Revert file permissions
chmod -w manjaro/etc/sudoers
  1. Then proot into manjaro and run the command, it will work
sudo pacman -Syyy

i edited the file by updating it because it was giving error so i added ALL at the end like this

manjaro ALL=(ALL:ALL) ALL

and it works

krmanik commented 2 years ago

The error is here root ALL=(ALL:ALL) ALL. Because it is not matching so the file does not update. https://github.com/krmanik/Manjaro-Linux-on-Android/blob/f5b364090135b90be7ec464bfbcd2a696e3d2f9e/manjaro.sh#L210