Connect to Server as guest from command line

Solution 1:

In order to mount as "guest", you need to use another command: mount_smbfs

mount_smbfs -N //guest@server/share /some/existing/path

The "-N" is "don't ask for password" (type man mount_smbfs for more info).

As for the second part of how to create it on the fly (the path), I believe that it's not possible. The mount command doesn't create it on the fly and even the man pages mention the "correct" way is to mkdir first then mount.

See the man page for mount_smbfs.