Android device owners who use Tasker, may be interested to learn of a new plugin from XDA forum member intangibleDroid.
Secure Settings is a Tasker/Locale compatible plugin for Android OS 2.2 and above, and allows users to :
Toggle the keyguard
Lock the device
Set or reset the device's password/pin
Run any linux command (with/without root)
Tasker users can store command output info...