Is there any programming interface or CLI for changing network or file sharing settings in OS X Leopard?
It is called dscl (Directory Service command line utility).