I’m building a PYNQ 3.0.1 image for the Digilent Cora-Z7, and I’ve run into an issue with using sudo
while booting using a USB rootfs. I’m actually developing a PYNQ image for a custom Zynq-7000 board that does not have SD card storage, and I’m using the Cora-Z7 to test out the USB boot process in the meantime. The boot and login process via USB seem to be successful, but when I try to run a command using sudo
, I get the following error:
(pynq-venv) xilinx@pynq:/$ sudo
sudo: /etc/sudo.conf is owned by uid 1001, should be 0
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set
The sudo
permissions are set as:
-rwxr-xr-x 1 1001 1001 177492 Feb 14 2022 sudo
However, when I boot the same PYNQ image from an SD card, sudo
has these permissions:
-rwsr-xr-x 1 root root 177492 Feb 14 2022 /bin/sudo
The UID/groups information for both USB and SD boot is the same:
xilinx@pynq:~$ echo $UID
1000
xilinx@pynq:~$ groups
xilinx adm sudo
When I try to switch to the root user to correct the permissions using the default password “xilinx”, I get an authentication failure:
(pynq-venv) xilinx@pynq:/$ su -
Password:
su: Authentication failure
Is there any reason why booting using a USB rootfs would change the sudo permissions? Any tips for solving this problem?
Thanks!