Script for turning Securiity on/off ?

I am not a scripter at all, but would be appreciative if someone had a simple script for turning on/off the “Require password to wake this computer from sleep or screen saver” in the Security System Preference in OS 10.3.x

Thank you,

I also need this, how can I do this (using a shell script not GUI)

Sorry; I only know the 10.4 (Tiger) GUI method for doing it:

tell application "System Preferences"
	reveal anchor "Main" of pane ""
	tell application "System Events" to tell process "System Preferences" to click checkbox 1 of window 1
end tell

Hello. I tried to run your script, and it returned the following error message:
“System Events got an error: NSReceiverEvaluatorScriptEditor: 4”

Any idea how to fix this? I am trying to find an easy way to switch between needing a screensaver password. At work, I want the password on, but when I bring the laptop home I don’t want to enter it every time. I figured there has to be a quicker way to do this than opening system preferences each time and manually selecting and de-selecting the option.

Thank you.