0

I'm trying to manipulate a squashfs file, containing a yocto build and an application payload, but everytime I do so, sudo fails to execute afterwards. root user is disabled, so I have no real alternative.

My approach is to just unpack the filesystem and then repackage the unpacked files. In that process the owner is set to my local user (which is fine -- I can fix that) and, it seems, setuid is removed from sudo.

0

Assuming you are using unsquashfs to unpack the files, you will get a set of files owned by you and with no setuid bits. But you can manually put back the setuid bit on any files you want (with chmod u+s); of course they will be setuid to your id. But when you repackage the files using mksquashfs add the option -all-root and all the files in the filesystem will be owned by root, not you, and any setuid bit will be preserved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.