Lock application with password?

Discussion in 'Mac Apps and Mac App Store' started by RockstarSR, Jul 15, 2011.

  1. RockstarSR macrumors member

    Mar 19, 2011
    I know that there are several threads on this same topic....but unfortunately, i haven't found a decent solution in any of those threads :(

    In my iPhone 4, i use an app called "Lockdown Pro"(Its a Cydia app) to lock individual apps with a password. I was surprised(infact shocked) to find that no such app exists for Mac OSX!!

    After some research, i found that there exists an app called App Defender to lock apps with a password:

    But after installing the app, it asks me to enter the Master Password which i haven't created it yet!!

    Does anyone else use Appdefender or any other software to lock the apps?

    PS: I tried the parental controls and the lock the disk image methods but they are not intuitive!! Need something better :eek:
  2. atxharley, Jul 27, 2011
    Last edited: Jul 29, 2011

    atxharley macrumors newbie

    Jul 27, 2011

    I really didn't like that app so I wrote my own script for this.
    It's not that complicated just follow the directions.
    Basically just adds and removes permissions from the app.

    There are about 4 things to change in this script.
    1. Password
    2. Username
    3. Sudo password - If your account is an admin then the password you use to get in...
    4. Same as 3!
    I put an --**EDIT_THIS** above everything you need to edit.

    How to Save this script.
    1. Give it a simple easy name like "Mail Lock"
    2. Save it as an application -- File Format: Application not as a script!
    3. Check the "Run Only" and uncheck the "Startup Screen"
    4. Put it in you applications and save to your dock.. Remove old mail icon from the dock. (You can change the icon of the "Mail Lock" to the "Mail" icon so it will look the same)

    The first time you run this it won't look like it did anything.. But when you close it try to open the original "Mail" app... You shouldn't be able to.. and all of those dirty pictures your gf sent you... they will all be gone from the "All Images" folder in Finder...

    Let me know if you have any questions.

    ---------Put everything below into a New Applescript and hit compile-------

    --**EDIT_THIS** Change "PASSWORD" and "USERNAME" to something only you know.. Make sure you leave the "" around your password and username!
    set B to "PASSWORD"
    set Y to "USERNAME"

    display dialog "Enter your User Name" default answer ""
    set theUserName to text returned of result
    if theUserName = Y then exit repeat

    end repeat
    repeat 3 times
    if theUserName is Y then display dialog "Please enter password" default answer "" with hidden answer

    set thePassWord to text returned of result

    if thePassWord = B then exit repeat
    end repeat
    --**EDIT_THIS** Edit the part that says "**PASSWORD**" Leave the ""
    if thePassWord = B then do shell script "sudo chmod 755 /applications/mail.app" password "**PASSWORD**" with administrator privileges

    do shell script "chmod 755 ~/Library/Mail"

    do shell script "Open -a Mail"

    tell application "Mail"

    end tell

    tell application "System Events" to get name of every process

    if result does not contain "Mail" then exit repeat
    end repeat
    --**EDIT_THIS** Edit the part that says "**PASSWORD**" Leave the ""
    do shell script "sudo chmod a-x /applications/mail.app" password "**PASSWORD**" with administrator privileges

    do shell script "chmod 664 ~/Library/Mail"
  3. atxharley macrumors newbie

    Jul 27, 2011

    I also have the above for other applications.

    and have a script to hide a disk image .dmg so nobody can find it unless you enter the correct user name and password.. That way you can keep all of your dirty little secrets to yourself.. LOL
  4. ScoobyMcDoo macrumors 65816

    Nov 26, 2007
    Austin, TX
    Why don't you just use user/group access that is built into the OS?

    In the applications folder, select the application for which you want to limit access, then hit cmd->i. At the bottom of the info dialog, you can set who has access to the application. You can even create groups from within the "Accounts" preference panel to set up groups of users.
  5. atxharley macrumors newbie

    Jul 27, 2011

    Basically that's what the script does but in more of an application type feel!

Share This Page