~lefteris-nikoltsios/+junk/samba-lp1016895

« back to all changes in this revision

Viewing changes to swat2/install/provision.esp

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-12-21 13:18:04 UTC
  • mfrom: (0.39.21 sid)
  • Revision ID: package-import@ubuntu.com-20111221131804-xtlr39wx6njehxxr
Tags: 2:3.6.1-3ubuntu1
* Merge from Debian testing.  Remaining changes:
  + debian/patches/VERSION.patch:
    - set SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/patches/error-trans.fix-276472:
    - Add the translation of Unix Error code -ENOTSUP to NT Error Code
    - NT_STATUS_NOT_SUPPORTED to prevent the Permission denied error.
  + debian/smb.conf:
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] share, and add a comment about
      "valid users = %S" to show users how to restrict access to
      \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are 
      allowed to create public shares in addition to authenticated
      ones.
    - add map to guest = Bad user, maps bad username to guest access.
  + debian/samba-common.config:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/control:
    - Don't build against or suggest ctdb.
    - Add dependency on samba-common-bin to samba.
  + Add ufw integration:
    - Created debian/samba.ufw.profile
    - debian/rules, debian/samba.dirs, debian/samba.files: install
      profile
    - debian/control: have samba suggest ufw
  + Add apport hook:
    - Created debian/source_samba.py.
    - debian/rules, debian/samba.dirs, debian/samba-common-bin.files: install
  + Switch to upstart:
    - Add debian/samba.{nmbd,smbd}.upstart.
  + debian/samba.logrotate, debian/samba-common.dhcp, debian/samba.if-up:
    - Make them upstart compatible
  + debian/samba.postinst: 
    - Avoid scary pdbedit warnings on first import.
  + debian/samba-common.postinst: Add more informative error message for
    the case where smb.conf was manually deleted
  + debian/patches/fix-debuglevel-name-conflict.patch: don't use 'debug_level'
    as a global variable name in an NSS module 
  + Dropped:
    - debian/patches/error-trans.fix-276472
    - debian/patches/fix-debuglevel-name-conflict.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<% page_header("columns", "Provisioning", "install"); 
2
 
 
3
 
  include("/scripting/forms.js");
4
 
  libinclude("base.js");
5
 
  libinclude("provision.js");
6
 
%>
7
 
 
8
 
<h1>Samba4 provisioning</h1>
9
 
 
10
 
<%
11
 
var f = FormObj("Provisioning", 0, 2);
12
 
var i;
13
 
var lp = loadparm_init();
14
 
if ((session.authinfo.user_class == "ADMINISTRATOR")
15
 
         || (session.authinfo.user_class == "SYSTEM")) {
16
 
 
17
 
        if (lp.get("realm") == "") {
18
 
                lp.set("realm", lp.get("workgroup") + ".example.com");
19
 
        }
20
 
 
21
 
        var subobj = provision_guess();
22
 
        /* Don't supply default password for web interface */
23
 
        subobj.ADMINPASS = "";
24
 
 
25
 
        f.add("REALM", "DNS Domain Name");
26
 
        f.add("DOMAIN", "NetBIOS Domain Name");
27
 
        f.add("HOSTNAME", "Hostname");
28
 
        f.add("ADMINPASS", "Administrator Password", "password");
29
 
        f.add("CONFIRM", "Confirm Password", "password");
30
 
        f.add("DOMAINSID", "Domain SID");
31
 
        f.add("HOSTIP", "Host IP");
32
 
        f.add("DEFAULTSITE", "Default Site");
33
 
        f.submit[0] = "Provision";
34
 
        f.submit[1] = "Cancel";
35
 
 
36
 
        if (form['submit'] == "Cancel") {
37
 
                redirect("/");
38
 
        }
39
 
 
40
 
        if (form['submit'] == "Provision") {
41
 
                for (r in form) {
42
 
                        subobj[r] = form[r];
43
 
                }
44
 
        }
45
 
 
46
 
        for (i=0;i<f.element.length;i++) {
47
 
                f.element[i].value = subobj[f.element[i].name];
48
 
        }
49
 
 
50
 
        if (form['submit'] == "Provision") {
51
 
        
52
 
                /* overcome an initially blank smb.conf */
53
 
                lp.set("realm", subobj.REALM);
54
 
                lp.set("workgroup", subobj.DOMAIN);
55
 
                lp.reload();
56
 
                var goodpass = (subobj.CONFIRM == subobj.ADMINPASS);
57
 
 
58
 
                var paths = provision_default_paths(subobj);
59
 
                provision_fix_subobj(subobj, paths);
60
 
 
61
 
                if (!goodpass) {
62
 
                        write("<h3>Passwords don't match.  Please try again.</h3>");
63
 
                        f.display();
64
 
                } else if (subobj.ADMINPASS == "") {
65
 
                        write("<h3>You must choose an administrator password.  Please try again.</h3>");
66
 
                        f.display();
67
 
                } else if (!provision_validate(subobj, writefln)) {
68
 
                        f.display();
69
 
                } else {
70
 
                        if (!provision(subobj, writefln, false, paths, 
71
 
                                       session.authinfo.session_info, session.authinfo.credentials, false)) {
72
 
                                writefln("Provision failed!");
73
 
                        } else if (!provision_dns(subobj, writefln, paths,
74
 
                                                  session.authinfo.session_info, session.authinfo.credentials)) {
75
 
                                writefln("DNS Provision failed!");
76
 
                        } else {
77
 
                                writefln("Provision Complete!");
78
 
                        }
79
 
                }
80
 
        } else {
81
 
                f.display();
82
 
        }
83
 
} else {
84
 
        redirect("/");
85
 
}
86
 
 
87
 
%>
88
 
 
89
 
 
90
 
<% page_footer(); %>