When running extract_qnap_fw.sh on a QNAP NAS, mounting something on /mnt hides already existing mounts within /mnt. A lot of file in /etc are actually just symlinks to /mnt/config, and /etc/passwd is one of them. So when mounting a directory on /mnt results in loosing access to all account information. I.e. any subsequent attempt to use sudo (or login to the system) fails.
This change uses temporary directories (created using mktemp) to mount images in order to avoid the issue.
When running
extract_qnap_fw.sh
on a QNAP NAS, mounting something on/mnt
hides already existing mounts within/mnt
. A lot of file in/etc
are actually just symlinks to/mnt/config
, and/etc/passwd
is one of them. So when mounting a directory on/mnt
results in loosing access to all account information. I.e. any subsequent attempt to use sudo (or login to the system) fails.This change uses temporary directories (created using
mktemp
) to mount images in order to avoid the issue.