Where are SAM user templates stored?

Hey, new here, so be nice! I'm trying to write a little script to automate the user creation process on one of our boxes. But I would like to be able to use the templates that we have set up in SAM. Is the information in these templates stored in a file somewhere, that I can reference in my script? If so, where are they?

Hello, I don't have HPUX currently handy, but I can see from "man sam" at google that :

Check those files, HTH.

Thanks for replying, unfortunately, I've already looked at those files. They don't contain any information about individual templates that you create in SAM.

Found it. I don't know if it's the same in all boxes, but I found its /var/sam/ug/templates/ts.

Exactly what I needed.

I was going to start a new thread for this, but it's kind of on the same topic, so here goes.

Now that I've found that template file, I'm not sure I know how to use it. Let me give you a sample of the file:

handle 1 {
list UG_TS_UT 1 {
UG_TS_UT {
UG_TS_UT_TITLE = "MyTemplate";
UG_TS_UT_DESC = "User of MyTemplate";
UG_TS_UT_HDPATH = "/home";
UG_TS_UT_SUP = "/bin/tcsh";
UG_TS_UT_PGRP = "users2";
UG_TS_UT_ALTSTR = NULL;
UG_TS_UT_BOOTSU = "NO";
UG_TS_UT_PWDFSGP = "DFT";
UG_TS_UT_PWDFSGC = "DFT";
UG_TS_UT_PWDFSGL = "DFT";
UG_TS_UT_PWDFUSP = "DFT";
UG_TS_UT_PWDFERR = "DFT";
UG_TS_UT_PWDFNUL = "DFT";
UG_TS_UT_PWDFLEN = -1;
UG_TS_UT_PGID = 108;
UG_TS_UT_UIDVAL1 = NULL;
UG_TS_UT_UIDVAL2 = NULL;
UG_TS_UT_LOGENV = NULL;
UG_TS_UT_UIDMETH = 1;
UG_TS_UT_INCCOM = 1;
UG_TS_UT_ACCACT = 1;
UG_TS_UT_ALTTYPE = 1;
UG_TS_UT_ACCLFTM = -1;
UG_TS_UT_MAXPOI = -1;
UG_TS_UT_UNSUCLT = -1;
UG_TS_UT_PWDAGING = -1;
UG_TS_UT_PWDTBC = -1;
UG_TS_UT_PWDEXPT = -1;
UG_TS_UT_PWDWARN = -1;
UG_TS_UT_PWDLFTM = -1;
UG_TS_UT_PWDOPT = 2;
UG_TS_UT_CRHD = 1;
UG_TS_UT_PSD = 1;
};
};
};

Now I'm just learning shell scripting, so I don't know what this kind of script is called. Those can't be variables, can they, because variables can't have spaces around the equals sign! So my question is, what is the name of the scripting technique here, and how can I access those parameters in my script?

Alright, I've just learned that this little file is actually a perl script that contains a subroutine for each template, setting the parameters for the template in each subroutine.

So how do I call this file, and access the variables in these subroutines in my shell script?