ophub / amlogic-s9xxx-armbian

Support for Armbian in Amlogic, Rockchip and Allwinner boxes. Support a311d, s922x, s905x3, s905x2, s912, s905d, s905x, s905w, s905, s905l, rk3588, rk3568, rk3399, rk3328, h6, etc.
GNU General Public License v2.0
5.7k stars 1.83k forks source link

Can't use sudo on another user #356

Closed JerryWn12 closed 2 years ago

JerryWn12 commented 2 years ago

I've created a user named jerry on first startup configuration, but i don't have sudo access. Device: Phicomm N1 (s905d) Kernel: 5.10.119 Armbian branch: current Armbian release: jammy Here is the error message:

armbian:~:% sudo test
sudo: /etc/sudo.conf is owned by uid 1023, should be 0
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set
JerryWn12 commented 2 years ago

I'm also tried to run armbian-docker with root user, but i got this, i think it's the same problem:

armbian:~:# armbian-docker
[INFO] Welcome to docker installation tool.
[INFO] VERSION_CODEID: ubuntu
[INFO] VERSION_CODENAME: jammy
[STEPS] Initialize the docker installation environment ...
sudo: /etc/sudo.conf is owned by uid 1023, should be 0
sudo: /etc/sudo.conf is owned by uid 1023, should be 0
sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"
sudo: /usr/libexec/sudo/sudoers.so must be owned by uid 0
sudo: fatal error, unable to load plugins
sudo: /etc/sudo.conf is owned by uid 1023, should be 0
sudo: /etc/sudo.conf is owned by uid 1023, should be 0
sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"
sudo: /usr/libexec/sudo/sudoers.so must be owned by uid 0
sudo: fatal error, unable to load plugins
sudo: /etc/sudo.conf is owned by uid 1023, should be 0
sudo: /etc/sudo.conf is owned by uid 1023, should be 0
sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"
sudo: /usr/libexec/sudo/sudoers.so must be owned by uid 0
sudo: fatal error, unable to load plugins
sudosudo: : /etc/sudo.conf is owned by uid 1023, should be 0/etc/sudo.conf is owned by uid 1023, should be 0

sudosudo: : /etc/sudo.conf is owned by uid 1023, should be 0/etc/sudo.conf is owned by uid 1023, should be 0

sudosudo: : error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"

sudosudo: : /usr/libexec/sudo/sudoers.so must be owned by uid 0/usr/libexec/sudo/sudoers.so must be owned by uid 0

sudosudo: : fatal error, unable to load pluginsfatal error, unable to load plugins

sudo: /etc/sudo.conf is owned by uid 1023, should be 0
sudo: /etc/sudo.conf is owned by uid 1023, should be 0
sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"
sudo: /usr/libexec/sudo/sudoers.so must be owned by uid 0
sudo: fatal error, unable to load plugins
[STEPS] Install docker related packages ...
sudo: /etc/sudo.conf is owned by uid 1023, should be 0
sudo: /etc/sudo.conf is owned by uid 1023, should be 0
sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"
sudo: /usr/libexec/sudo/sudoers.so must be owned by uid 0
sudo: fatal error, unable to load plugins
sudo: /etc/sudo.conf is owned by uid 1023, should be 0
sudo: /etc/sudo.conf is owned by uid 1023, should be 0
sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"
sudo: /usr/libexec/sudo/sudoers.so must be owned by uid 0
sudo: fatal error, unable to load plugins
[STEPS] Install docker accelerator ...
sudo: /etc/sudo.conf is owned by uid 1023, should be 0
sudo: /etc/sudo.conf is owned by uid 1023, should be 0
sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"
sudo: /usr/libexec/sudo/sudoers.so must be owned by uid 0
sudo: fatal error, unable to load plugins
sudo: /etc/sudo.conf is owned by uid 1023, should be 0
sudo: /etc/sudo.conf is owned by uid 1023, should be 0
sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"
sudo: /usr/libexec/sudo/sudoers.so must be owned by uid 0
sudo: fatal error, unable to load plugins
sudo: /etc/sudo.conf is owned by uid 1023, should be 0
sudo: /etc/sudo.conf is owned by uid 1023, should be 0
sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"
sudo: /usr/libexec/sudo/sudoers.so must be owned by uid 0
sudo: fatal error, unable to load plugins
[SUCCESS] Docker installed successfully.
/usr/sbin/armbian-docker: line 140: docker: command not found
[OPT] Select Install Portainer-ce?  No=(n) / LAN ip access=(h) / Domain cert access=(s): h
[STEPS] Select Install Portainer (No SSL certificate, http LAN access)...
sudo: /etc/sudo.conf is owned by uid 1023, should be 0
sudo: /etc/sudo.conf is owned by uid 1023, should be 0
sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"
sudo: /usr/libexec/sudo/sudoers.so must be owned by uid 0
sudo: fatal error, unable to load plugins
sudo: /etc/sudo.conf is owned by uid 1023, should be 0
sudo: /etc/sudo.conf is owned by uid 1023, should be 0
sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"
sudo: /usr/libexec/sudo/sudoers.so must be owned by uid 0
sudo: fatal error, unable to load plugins
[SUCCESS] The portainer address [ http://ip:9000 ]
ophub commented 2 years ago
1. add user

sudo adduser username 

2. Add sudo permissions for the user

sudo usermod -G sudo username 

3. Add root permissions for the user

 sudo vim /etc/sudoers

# User privilege specification 
root ALL=(ALL) ALL 
username ALL=(ALL) ALL 
JerryWn12 commented 2 years ago

It dont work...