I’m porting a plugin to OSX. Despite being new to OSX, I understand there are often a lot of security preliminaries which need to be taken into account as far as deployment is concerned.
However, what I’m not so sure about is how much this would interfere with a simple mechanism in Ruby which would ask the user for their password so a file could be copied to a sub folder within the system’s
The initial process would be as follows:
User installs plugin to host application.
User launches plugin.
Let user know that they need to give their password to finish the installation. If the password is given, install necessary prerequisite to system directory.
Run the plugin, all is good.
Is this possible? I know this might sound like a stupid question, but I’m not aware of any OSX-specific Ruby API to aid in the facilitation of something like this.
While I can execute something like
system("echo <password> | sudo -S <command>"), is there an alternative for situations in which the user doesn’t have a password set? My understanding is that OSX won’t allow for the sudo command to be executed unless the user has a password.
I must be missing something, but this is indeed somewhat of a conundrum.