1 <% page_header("columns", "Add a user", "install");
3 include("/scripting/forms.js");
5 libinclude("provision.js");
11 var f = FormObj("newuser", 0, 2);
13 var rand = random_init();
15 f.add("USERNAME", "User Name");
16 f.add("UNIXNAME", "Unix Name");
17 f.add("PASSWORD", "Password", "password");
18 f.add("CONFIRM", "Confirm Password", "password");
20 f.submit[1] = "Cancel";
22 if (form['submit'] == "Cancel") {
27 if (form['submit'] == "Add" &&
28 form.USERNAME != undefined) {
29 var goodpass = (form.CONFIRM == form.PASSWORD);
32 write("<h3>Passwords don't match. Please try again.</h3>");
35 if (form.UNIXNAME == undefined) {
36 form.UNIXNAME = form.USERNAME;
38 if (form.PASSWORD == undefined) {
39 form.PASSWORD = rand.randpass();
41 newuser(form.USERNAME, form.UNIXNAME, form.PASSWORD, writefln,
42 session.authinfo.session_info, session.authinfo.credentials);