•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Legacy and Other Languages section within the Software Development category of DaniWeb, a massive community of 456,428 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,602 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Legacy and Other Languages advertiser: Programming Forums
Views: 1079 | Replies: 3 | Solved
![]() |
Hey, I didn't see a forum for shell scripting, so I hope this is the place to put it. As part of my new job, I'm learning a little shell scripting, working on an HP-UX system.
I'm trying to automate a user account creation process, and I need to access the template file that SAM uses so I can set certain attributes of the user's account, according to the template file. (I know, why not just use SAM? That's the same question I asked my boss, ask him. I don't know.)
Here is a sample of the template file, called /var/sam/ug/templates/ts:
Now, if any of you use HP-UX, you'll know that SAM uses the parameters set in this file to create user accounts according to this template, which is called "MyTemplate".
But how can I use these parameters? They don't look like variables, because you can't have spaces before or after the equal sign with variables. So what is this type of script called, and how can I call it in my script to use those values?
sorry this is long, I hope I made sense.
I'm trying to automate a user account creation process, and I need to access the template file that SAM uses so I can set certain attributes of the user's account, according to the template file. (I know, why not just use SAM? That's the same question I asked my boss, ask him. I don't know.)
Here is a sample of the template file, called /var/sam/ug/templates/ts:
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, if any of you use HP-UX, you'll know that SAM uses the parameters set in this file to create user accounts according to this template, which is called "MyTemplate".
But how can I use these parameters? They don't look like variables, because you can't have spaces before or after the equal sign with variables. So what is this type of script called, and how can I call it in my script to use those values?
sorry this is long, I hope I made sense.
Last edited by nathanpacker : Jul 18th, 2007 at 12:04 pm.
•
•
Join Date: Apr 2005
Location: Dundee, Scotland
Posts: 12,883
Reputation:
Rep Power: 32
Solved Threads: 304
TRY MY SUGGESTIONS AT YOUR OWN RISK
Master of puppets Im pulling your strings, blinded by me, you cant see a thing. Master! Master!
Master of puppets Im pulling your strings, blinded by me, you cant see a thing. Master! Master!
![]() |
•
•
•
•
•
•
•
•
DaniWeb Legacy and Other Languages Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Help!! bash shell scripting.. (Shell Scripting)
- Sleep Command in UNIX Shell Scripting (Shell Scripting)
- new to shell scripting, need some help (Shell Scripting)
- how to Upload files using Linux bash Shell scripting and CGI (Shell Scripting)
- shell scripting help with backup script (Shell Scripting)
- "shell scripting tutorials?" (Shell Scripting)
Other Threads in the Legacy and Other Languages Forum
- Previous Thread: dont know what kind of code this is, need help
- Next Thread: Help with prolog



Linear Mode