How do I add a username alias using the command line?

I can do it fine using the preferences dialog through the "Advanced Options", but I need to do it during an installation script. 

Can someone point me the right way?