I can fix a normal smb.conf, but do not know how to edit this esmith template. Any suggestions would be appreciated.
I can
totally relate, when I was still a SME newbie I could not get my head around templates at all, and the questions I asked were responded to with the usual RTFM, Search the F'ing Forum etc etc crap, which when you are trying to solve a seeming simple, but urgent problem is not what you want to hear!

The information *is* in the documentation
http://no.longer.valid/phpwiki/index.php/Key%20conceptshttp://no.longer.valid/phpwiki/index.php/Customizingand when I read it now I can mostly understand it, but it's not really explained in a way that I found easy to understand at the time so here goes: (BTW I'm not an expert, and there are some aspects of the system which still ellude me but I'll do my best to explain for you)
The config files, e.g.
/etc/smb.conf are built from the contents of the template folders. so,
/etc/e-smith/templates/etc/smb.conf will contain a bunch of files which are used to make your smb.conf file.
Each of these files is called a template fragment (guru's please correct me if I'm wrong with any of this)
Each fragment is a plain text file, but perl can be embedded into it.
The files are parsed in name order (which is why they each start with a number... this is so that they get parsed in the order you want them to be)
If text is encountered then it is appended to the new conf file, if perl is encountered (identified with {curly braces}) then that code is processed which will output some text which is put into the conf file.
The STANDARD templates are stored in
/etc/e-smith/templatestemplates created by contribs or by yourself should go into
/etc/e-smith/templates-customYou shouldn't EVER change anything in
templates, because when/if you update the server, these templates will likely be replaced.
If you want for example to change the
smb.conf file to add something to the [global] section; instead of changing the 10globals file in
templates you would create an equivalent file in
templates-customFirst though you need to create the directory structure.
so its
mkdir -p /etc/e-smith/templates-custom/etc/smb.conf
This creates the required direcetory structure (the -p flag just tells linux to create any parent folders that are required)
Next you copy the template fragment you want to edit to the
templates-custom folder:
cp /etc/e-smith/templates/etc/smb.conf/10globals /etc/e-smith/templates-custom/etc/smb.conf/
To be completely honest though, I'll frequently use Midnight Commander (
mc at the command line)to do this! I know, I'm cheating! So shoot me!

Now you edit the 10globals file in the
templates-custom directory to whatever you want.
If you want to add another template instead of editing an existing one, just name it so that it gets parsed at the right point, so if you wanted it to go after 20something but before 30something call it 25something (doesn't this remind you of the old BBC/Spectrum Basic Days? ahhh...
Now, to re-build the template, you do a
expand-template /etc/smb.conf
and hey presto! the smb.conf file is built.
Note that if an identically named template fragment exists in both
templates and
templates-custom then the
templates-custom one will take precedence.
I hope this has been of help to you!
Time for a
