I wrote a shell script to configure screensaver and auto-login security settings under Mac OS X. It works under Lion. I suspect it might work on Snow Leopard and earlier versions too.

$ secure

Syntax: /usr/local/bin/secure set|unset|reset|show

'set' disables auto-login and enables password for screensaver. <- Secure
'unset' enables auto-login and disables password for screensaver. <- Unsafe
'reset' disables password for screensaver and disables auto-login. <- Trusting
'show' displays current security settings.

Note that enabling auto-login only works for the user enabled for auto-login in System Preferences.

You can download it here:

 © Andrew Brehm 2016