I have written an Automator application with the following shell script to open an FTP connection on my system:
sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist osascript -e 'tell app "Finder" to display alert "SFTP Opened"'
This works exactly as expected except that the sudo command needs a password. When the same command is run on Terminal, it prompts me for a password but when run as an Automator app, doesn't prompt me for any input. Is there anyway to programmatically pass the password to this sudo within the Automator script? I know this is not a safe practice but I still want to do it as my system is reasonably secure and untouched by anyone other than me.
A "do shell script...with administrator privileges" method is giving the following error: