|
|
Lock and unlock a Mac using Bluetooth detection
This is a pretty nifty hint. I have tried it on 10.6 and it works! Edited on Dec 29, '09 09:43:06PM by robg
Lock and unlock a Mac using Bluetooth detection
I followed instructions, but the inrange script doesn't work...
Lock and unlock a Mac using Bluetooth detection
Hi!
Lock and unlock a Mac using Bluetooth detection
I made the same thought, but I don't understand how it can work for others users... maybe the problem is another.
Lock and unlock a Mac using Bluetooth detection
Same problem here. But that's not the fault of the script! I also have it sometimes, when I wake my MBP from sleep. And there seem to be more of us :-)
Lock and unlock a Mac using Bluetooth detection
To those that are happy to settle for a lesser amount of security, here is the original solution I used, which has AppleScript type out your password explicitly. Keep in mind that this approach requires you to have your password within the 'inrange' applescript in plain text mode!!!
Lock and unlock a Mac using Bluetooth detection
You could use keychain scripting to store and retrieve a pw from the keychain instead of storing it in the script. Also, this way if your pw changes, you just have to change it in the keychain instead of modifying the script. I'm not at my computer right now and I forget exactly how to do this, but I remember it was unbelievably easy. I think it was something like this:
And then just manually create an entry called AdminPassword in your default keychain (or you can modify this to use a different keychain if you want.)
Lock and unlock a Mac using Bluetooth detection
I agree though that this is a better implementation as it doesn't require you to remember to change the passwords everywhere.
Lock and unlock a Mac using Bluetooth detection
thanks to both of you, that works perfectly! I think it requires setting Access Control in Keychain Access to allow access to it by proximity. I currently have access allowed for Proximity, Keychain Scripting and Applescript Editor but think I've ended up with so many permissions because I tested the script out in the editor. Edited on Jan 04, '10 08:56:34AM by puzzlebobble
Lock and unlock a Mac using Bluetooth detection
I'd assume you need Keychain Scripting access since the Proximity applescript is telling Keychain Scripting to get the PW - Keychain Scripting is the one actually making the request for it. The permission granted to Proximity is probably a permission for Keychain Scripting to pass the PW back to Proximity. Of course I could be completely wrong on all of this - I just like to make guesses at how computers work and revise them as necessary - life's all about trial and error!
Lock and unlock a Mac using Bluetooth detection
sounds sensible. It asked my permission for both when I tested the script in Proximity. Pity I can't remember which order it asked. I've turned off access for the applescript editor and it still works.
Lock and unlock a Mac using Bluetooth detection
It is nice to know that the app that calls Keychain Scripting also requires permission, because when I fooled with Keychain Scripting once before and allowed it to access my PW, I was worried that I might be allowing ANY applescript to access my PW via Keychain Scripting.
Lock and unlock a Mac using Bluetooth detection
do you happen to know if it is possible to pass a password from the keychain into terminal. I was hoping to be able execute an applescript which changed the HD spindown time when I changed location. I can open terminal and set the command:
Lock and unlock a Mac using Bluetooth detection
I think you want something like this:
(I think that's the correct syntax)
This way you do not need to say sudo in your script; all commands in the script will be run with full admin priveleges.
Lock and unlock a Mac using Bluetooth detection
cool, I must have been typing at the same time as you. I'll give that way a go. thanks!
Lock and unlock a Mac using Bluetooth detection
think I got it:
Lock and unlock a Mac using Bluetooth detection
Cool. I don't think you need "sudo", as the "with administrator privileges" gives the script the same rights as sudo. I read here that using both can create some kind of security hole, though I'm not sure how and the article doesn't explain.
Lock and unlock a Mac using Bluetooth detection
I thought it sounded like a fishy security hole when I saw your script tries to Now as far as a solution to this, I know you can run shell scripts with admin (ie. sudo) privileges in AppleScripts, so I'm sure there must be a terminal command that will set this (I'll leave it to someone else to find and post back with the command). Running a shell script with admin privileges still requires the pw be passed by the script if you don't want to prompt the user for it, but rather than hardcoding the pw in your script, you could use the keychain (see my reply to mech14 above.) Edited on Dec 30, '09 06:35:39AM by everkleer80
Lock and unlock a Mac using Bluetooth detection
I'm sorry folks with SL but I'm sticking w/ Leopard for a while so I cannot check this.
Lock and unlock a Mac using Bluetooth detection
If one wanted to take an entirely scripted approach - you could use the lightblue python library. I started on this once and just have a proof of concept script that looks like:
import sys
import os
import lightblue
import time
def main():
while True:
try:
lightblue.finddevicename('00:23:32:F9:EF:7C',usecache=False)
print 'still here'
except lightblue._lightbluecommon.BluetoothError:
print time.strftime("%H:%M:%S")
return
time.sleep (5)
if __name__ == '__main__':
main()
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.06 seconds |
|