You can create shares from the command line or a batch file using NET SHARE (type net share /? for syntax) and you can map any share using NET USE. There is no native way to establish share permissions from the command line. The NT Server Resource Kit contains PERMCOPY.EXE that allows you to copy permissions from one share to another. You can either use an existing share as the source or create some hidden models (hidden shares end with a $ as in \\MachineName\Model1$). The syntax for PERMCOPY.EXE is:

permcopy \\SourceMachine SourceShareName \\DestinationMachine DestinationShareName (Source and Destination MachineName can be the same).
You may also use RMTSHARE.EXE from the Resource Kit to set up shares with permissions.