$ sudo dscl . -create /Users/ftp
$ sudo dscl . -create /Users/ftp NFSHomeDirectory /path/to/ftp/folder
Replace /path/to/ftp/folder with the path to the directory that the guest account will have access to. To disable anonymous access, use this command:
$ sudo dscl . -delete /Users/ftp
You may have to restart the FTP daemon by stopping File Sharing and starting it again in System Preferences. Although I didn't test it in Leopard, I see no reason why it shouldn't work there as well.
[robg adds: I haven't tested this one.]

