I have compose and application which repairs disks via "fsck_hfs". I would like to make it available for others, but because of the sudo command, it is reporting an error when I try to run it on another account. I need to implement something (like askpass?) to have higher privileges (only for the sudo command)
Here is the code :
let trait2 = "/dev/disk2s2" /
let sudo : NSTask = NSTask()
sudo.launchPath = "/usr/bin/sudo"
sudo.arguments = [ "fsck_hfs","-dfr",trait2 ]
sudo.launch()
sudo.waitUntilExit()I have setup sudoers on my account so it work but if I try with another user, I get the following error message :
Unable to open block device /dev/disk2s2: Permission deniedWhat should I do to make this app available to others without them needing to do anything else then typing their password?
Thanks