I am creating an installer project that can build an installer for Linux, Windows, and Mac. For Linux I need to perform the following actions:
- I need to create the group usb2any
- I need to add that group to the current user
- I need to copy a udev rule to /etc/udev/rules.d
What I currently am trying to do for the addition of the group and adding the group to the user is use addGroup and addGroupToUser in my postInstallationActionList
However, it seems that these actions require root priveledges. I don't want to force the user to run the installer with sudo. Particularly because this also messes up the default installation to not be /home/user.
Is there a way to prompt the user for their password when running these commands?
I haven't been able to find an answer about this but I figured it can't be too uncommon to need to create a group and add a user to it as well as copy a file into the /etc/udev/rules.d directory without running the whole installer as root.
Please sign in to leave a comment.