I am searching for "gksudo" 's replacement in Mac.... I am developing a application that requires sudo pesmissions. I would like to display a pop-up to ask for sudo password. I have googled it and got to know about "cocoasudo". But cocoasudo needs to be installed.
Is there any inbuilt utility in Mac to achieve this.
My knowledge of OS-X is fairly limited but assuming it is not too dissimilar to Linux then a 'man sudo' should reveal that there is an an environment variable SUDO_ASKPASS which can be set to define a program to run to ask for the password when sudo -A is used. It may be that a different environment variable is used on OS-X but looking at the man page should help.
On Linux I have a Java Swing program that I can use but there are definite limitations. The main limitation I have found is that the password program cannot have any command line arguments so
is not allowed and one must wrap the 'java -jar mysudo.jar' up in a script. If I find a way to avoid this limitation I will post it but don't hold your breath; I don't think it is possible (security restrictions?).
Retired horse trader.
Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.