Those of you who have been wanting to run a script as the logged in user or manipulate files that are only available in the user's home directory should be able to take advantage of a couple of tricks:

Run as current logged in user:
The current user(s) can be returned using the command: /usr/bin/users

$ /usr/bin/users

So a shell script could be written to perform an action just for them (this one hides the desktop):

/usr/bin/defaults write $PrefDir/ CreateDesktop -bool FALSE
/usr/bin/killall Finder

Also, if you do need to do something to all users, even if they are not logged in, you can do something like this:

for USER_HOME in /Users/*;
  ## Get the short name of each user account (this of course doubles as the users' folder
  USER_ID=`basename "${USER_HOME}"`
  ## For each user account found (except Shared)
  if [ "${USER_ID}" != "Shared" ]; then
/usr/bin/defaults write /Users/$USER_ID/Preferences/ CreateDesktop -bool FALSE
/usr/bin/killall Finder