~ubuntu-branches/ubuntu/vivid/samba/vivid

« back to all changes in this revision

Viewing changes to swat2/install/vampire.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", "Windows to Samba Migration", "install"); 
2
 
 
3
 
  include("/scripting/forms.js");
4
 
  libinclude("base.js");
5
 
  libinclude("provision.js");
6
 
 
7
 
  var misc = misc_init();
8
 
%>
9
 
 
10
 
<h1>Windows to Samba4 domain migration</h1>
11
 
 
12
 
<%
13
 
var f = FormObj("Provisioning", 0, 2);
14
 
var i;
15
 
var lp = loadparm_init();
16
 
 
17
 
if ((session.authinfo.user_class == "ADMINISTRATOR")
18
 
         || (session.authinfo.user_class == "SYSTEM")) {
19
 
 
20
 
        if (lp.get("realm") == "") {
21
 
                lp.set("realm", lp.get("workgroup") + ".example.com");
22
 
        }
23
 
 
24
 
 
25
 
        var subobj = provision_guess();
26
 
        /* Don't supply default password for web interface */
27
 
        subobj.ADMINPASS = "";
28
 
 
29
 
        f.add("REALM", "DNS Domain Name");
30
 
        f.add("DOMAIN", "NetBIOS Domain Name");
31
 
        f.add("ADMIN", "Administrator Username");
32
 
        f.add("ADMINPASS", "Administrator Password", "password");
33
 
        f.add("HOSTNAME", "My Hostname");
34
 
        f.add("HOSTIP", "My Host's IP");
35
 
        f.add("DEFAULTSITE", "Default Site");
36
 
        f.submit[0] = "Migrate";
37
 
        f.submit[1] = "Cancel";
38
 
 
39
 
        if (form['submit'] == "Cancel") {
40
 
                redirect("/");
41
 
        }
42
 
 
43
 
        if (form['submit'] == "Migrate") {
44
 
                for (r in form) {
45
 
                        subobj[r] = form[r];
46
 
                }
47
 
        }
48
 
        
49
 
        for (i=0;i<f.element.length;i++) {
50
 
                f.element[i].value = subobj[f.element[i].name];
51
 
        }
52
 
        
53
 
        if (form['submit'] == "Migrate") {
54
 
                /* overcome an initially blank smb.conf */
55
 
                lp.set("realm", subobj.REALM);
56
 
                lp.set("workgroup", subobj.DOMAIN);
57
 
                lp.reload();
58
 
 
59
 
                if (subobj.ADMINPASS == "") {
60
 
                        write("<h3>We need the administrator password for the " + subobj.DOMAIN + " domain to proceed.  Please try again.</h3>");
61
 
                        f.display();
62
 
                } else if (!provision_validate(subobj, writefln)) {
63
 
                        f.display();
64
 
                } else if (strupper(lp.get("server role")) == "domain controller") {
65
 
                        writefln("You need to set 'server role' to 'member server' before starting the migration process");
66
 
                } else {
67
 
                        var creds = credentials_init();
68
 
                        var samdb;
69
 
                        creds.set_username(form.ADMIN);
70
 
                        creds.set_password(form.ADMINPASS);
71
 
                        creds.set_domain(form.DOMAIN);
72
 
                        creds.set_realm(form.REALM);
73
 
 
74
 
                        var info = new Object();
75
 
                        var paths = provision_default_paths(subobj);
76
 
                        var session_info = session.authinfo.session_info;
77
 
                        var credentials = session.authinfo.credentials;
78
 
 
79
 
                        provision_fix_subobj(subobj, paths);
80
 
                
81
 
                        info.session_info = session_info;
82
 
                        info.message = writefln;
83
 
                        info.subobj = subobj;
84
 
 
85
 
                        /* Setup a basic database structure, but don't setup any users */
86
 
                        if (!provision(subobj, writefln, true, paths,
87
 
                                       session_info, credentials, false)) {
88
 
                                writefln("Provision failed!");
89
 
 
90
 
                                /* Join domain */
91
 
                        } else if (!join_domain(form.DOMAIN, form.HOSTNAME, misc.SEC_CHAN_BDC, creds, writefln)) {
92
 
                                writefln("Domain Join failed!");
93
 
                        
94
 
                                /* Vampire */
95
 
                        } else if (!vampire(form.DOMAIN, session.authinfo.session_info, 
96
 
                                            session.authinfo.credentials, writefln)) {
97
 
                                writefln("Failed to syncronsise remote domain into local database!");
98
 
                        } else if (!provision_dns(subobj, writefln, paths,
99
 
                                                  session.authinfo.session_info, session.authinfo.credentials)) {
100
 
                                writefln("DNS Provision failed!");
101
 
                        } else if (!(samdb = open_ldb(info, paths.samdb, false))) {
102
 
                                writefln("Opening " + paths.samdb + " failed!");
103
 
                                info.samdb = samdb;
104
 
                        } else if (!setup_name_mappings(info, samdb)) {
105
 
                                writefln("Setup of name mappings failed!");                     
106
 
                        } else {
107
 
                                var zonepath = paths.dns;
108
 
                                %>
109
 
<h3>Database migrated!</h3>
110
 
You need to do the following to complete the process:
111
 
<ul>
112
 
        <li>Install the <b>@@zonepath</b> zone file into your bind install, and restart bind
113
 
        <li>Change your smb.conf to set "server role = domain controller"
114
 
        <li>Shutdown your existing PDC and any other DCs
115
 
        <li>Restart smbd
116
 
</ul>
117
 
<%
118
 
                        }
119
 
                }
120
 
        } else {
121
 
                f.display();
122
 
        }
123
 
} else {
124
 
        redirect("/");
125
 
}
126
 
 
127
 
%>
128
 
 
129
 
 
130
 
<% page_footer(); %>