Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid hiding files in /mnt when extracting images #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ktetzlaff
Copy link

@ktetzlaff ktetzlaff commented Jul 14, 2023

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.

@ktetzlaff ktetzlaff force-pushed the kt-dont-overwrite-mnt-on-qnap branch from cbb5d63 to 55a02ce Compare May 21, 2024 13:35
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 to login to the
system) fails.

This change uses temporary directories (created using 'mktemp') to mount
images in order to avoid the issue.
@ktetzlaff ktetzlaff force-pushed the kt-dont-overwrite-mnt-on-qnap branch from 55a02ce to f5e7d18 Compare May 21, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant