From d1e09e2e6f9db62bbab84abb53e23ee73764178a Mon Sep 17 00:00:00 2001 From: Derrell Lipman Date: Sun, 31 Dec 2006 20:12:12 +0000 Subject: r20446: rename swat directory to swat.obsolete; keeping it around since there is lots of useful info in it. (This used to be commit 5f9f72a9cfab80561b23284001b67c4ea961757b) --- swat/install/index.esp | 20 -------- swat/install/newuser.esp | 50 ------------------- swat/install/provision.esp | 79 ----------------------------- swat/install/samba3.esp | 106 --------------------------------------- swat/install/vampire.esp | 120 --------------------------------------------- 5 files changed, 375 deletions(-) delete mode 100644 swat/install/index.esp delete mode 100644 swat/install/newuser.esp delete mode 100644 swat/install/provision.esp delete mode 100644 swat/install/samba3.esp delete mode 100644 swat/install/vampire.esp (limited to 'swat/install') diff --git a/swat/install/index.esp b/swat/install/index.esp deleted file mode 100644 index 5a73b7751f..0000000000 --- a/swat/install/index.esp +++ /dev/null @@ -1,20 +0,0 @@ -<% page_header("columns", "Server Installation", "install"); -%> - -

Installation

- -Welcome to Samba4 installation. Before proceeding, you will need to -know: - - - -After you have decided on those, choose the 'Provisioning' menu item -on the left, and fill in the form.

- -Warning! When you provision, your existing user database is -wiped and replaced with a new one. - -<% page_footer(); %> diff --git a/swat/install/newuser.esp b/swat/install/newuser.esp deleted file mode 100644 index 1b341ff665..0000000000 --- a/swat/install/newuser.esp +++ /dev/null @@ -1,50 +0,0 @@ -<% page_header("columns", "Add a user", "install"); - - include("/scripting/forms.js"); - libinclude("base.js"); - libinclude("provision.js"); -%> - -

Add a user

- -<% -var f = FormObj("newuser", 0, 2); -var i; -var rand = random_init(); - -f.add("USERNAME", "User Name"); -f.add("UNIXNAME", "Unix Name"); -f.add("PASSWORD", "Password", "password"); -f.add("CONFIRM", "Confirm Password", "password"); -f.submit[0] = "Add"; -f.submit[1] = "Cancel"; - -if (form['submit'] == "Cancel") { - redirect("/"); -} - - -if (form['submit'] == "Add" && - form.USERNAME != undefined) { - var goodpass = (form.CONFIRM == form.PASSWORD); - - if (!goodpass) { - write("

Passwords don't match. Please try again.

"); - f.display(); - } else { - if (form.UNIXNAME == undefined) { - form.UNIXNAME = form.USERNAME; - } - if (form.PASSWORD == undefined) { - form.PASSWORD = rand.randpass(); - } - newuser(form.USERNAME, form.UNIXNAME, form.PASSWORD, writefln, - session.authinfo.session_info, session.authinfo.credentials); - } -} else { - f.display(); -} -%> - - -<% page_footer(); %> diff --git a/swat/install/provision.esp b/swat/install/provision.esp deleted file mode 100644 index ee9673d507..0000000000 --- a/swat/install/provision.esp +++ /dev/null @@ -1,79 +0,0 @@ -<% page_header("columns", "Provisioning", "install"); - - include("/scripting/forms.js"); - libinclude("base.js"); - libinclude("provision.js"); -%> - -

Samba4 provisioning

- -<% -var f = FormObj("Provisioning", 0, 2); -var i; -var lp = loadparm_init(); - -if (lp.get("realm") == "") { - lp.set("realm", lp.get("workgroup") + ".example.com"); -} - - -var subobj = provision_guess(); -/* Don't supply default password for web interface */ -subobj.ADMINPASS = ""; - -f.add("REALM", "DNS Domain Name"); -f.add("DOMAIN", "NetBIOS Domain Name"); -f.add("HOSTNAME", "Hostname"); -f.add("ADMINPASS", "Administrator Password", "password"); -f.add("CONFIRM", "Confirm Password", "password"); -f.add("DOMAINSID", "Domain SID"); -f.add("HOSTIP", "Host IP"); -f.add("DEFAULTSITE", "Default Site"); -f.submit[0] = "Provision"; -f.submit[1] = "Cancel"; - -if (form['submit'] == "Cancel") { - redirect("/"); -} - -if (form['submit'] == "Provision") { - for (r in form) { - subobj[r] = form[r]; - } -} - -for (i=0;iPasswords don't match. Please try again."); - f.display(); - } else if (subobj.ADMINPASS == "") { - write("

You must choose an administrator password. Please try again.

"); - f.display(); - } else if (!provision_validate(subobj, writefln)) { - f.display(); - } else { - var paths = provision_default_paths(subobj); - if (!provision(subobj, writefln, false, paths, - session.authinfo.session_info, session.authinfo.credentials)) { - writefln("Provision failed!"); - } else if (!provision_dns(subobj, writefln, paths, - session.authinfo.session_info, session.authinfo.credentials)) { - writefln("DNS Provision failed!"); - } else { - writefln("Provision Complete!"); - } - } -} else { - f.display(); -} -%> - - -<% page_footer(); %> diff --git a/swat/install/samba3.esp b/swat/install/samba3.esp deleted file mode 100644 index 31857c01e9..0000000000 --- a/swat/install/samba3.esp +++ /dev/null @@ -1,106 +0,0 @@ -<% page_header("columns", "Upgrade", "install"); - - /* frontend to Samba3 upgrade. - Based on provision.esp - (C) Jelmer Vernooij 2005 - Published under the GNU GPL - */ - - include("/scripting/forms.js"); - libinclude("base.js"); - libinclude("provision.js"); - libinclude("upgrade.js"); -%> - -

Import from Samba3

- -<% -if (form['submit'] == "Cancel") { - redirect("/"); -} - -function confirm_form() -{ - var samba3 = samba3_read(form['LIBDIR'], form['SMBCONF']); - - var subobj = upgrade_provision(samba3); - var f = FormObj("Import from Samba3", 0, 2); - subobj.ADMINPASS = ""; - - f.add("REALM", "Realm"); - f.add("DOMAIN", "Domain Name"); - f.add("HOSTNAME", "Hostname"); - f.add("ADMINPASS", "Administrator Password", "password"); - f.add("CONFIRM", "Confirm Password", "password"); - f.add("DOMAINSID", "Domain SID"); - f.add("HOSTGUID", "Host GUID"); - f.add("HOSTIP", "Host IP"); - f.add("DEFAULTSITE", "Default Site"); - - for (i=0;iPasswords don't match. Please try again."); - confirm_form(); - } else if (subobj.ADMINPASS == "") { - write("

You must choose an administrator password. Please try again.

"); - confirm_form(); - } else { - var paths = provision_default_paths(subobj); - if (!provision(subobj, writefln, true, paths, - session.authinfo.session_info, session.authinfo.credentials)) { - writefln("Provision failed!"); - } else { - var ret = upgrade(subobj,samba3,message,paths, - session.authinfo.session_info, session.authinfo.credentials); - if (ret > 0) { - writefln("Failed to import %d entries\n", ret); - } else { - if (!provision_dns(subobj, writefln, paths, - session.authinfo.session_info, session.authinfo.credentials)) { - writefln("DNS Provision failed!"); - } else { - writefln("Reloading smb.conf\n"); - var lp = loadparm_init(); - lp.reload(); - writefln("Upgrade Complete!"); - } - } - } - } -} else { - var f = FormObj("Import from Samba3", 0, 2); - - f.add("SMBCONF", "smb.conf file", "text", "/etc/samba/smb.conf"); - f.add("LIBDIR", "Lib directory", "text", "/var/lib/samba"); - f.submit[0] = "Import"; - f.submit[1] = "Cancel"; - - write('

Warning: This will erase your current configuration!

'); - f.display(); -} -%> - -<% page_footer(); %> diff --git a/swat/install/vampire.esp b/swat/install/vampire.esp deleted file mode 100644 index 9ce874cd18..0000000000 --- a/swat/install/vampire.esp +++ /dev/null @@ -1,120 +0,0 @@ -<% page_header("columns", "Windows to Samba Migration", "install"); - - include("/scripting/forms.js"); - libinclude("base.js"); - libinclude("provision.js"); - - var misc = misc_init(); -%> - -

Windows to Samba4 domain migration

- -<% -var f = FormObj("Provisioning", 0, 2); -var i; -var lp = loadparm_init(); - -if (lp.get("realm") == "") { - lp.set("realm", lp.get("workgroup") + ".example.com"); -} - - -var subobj = provision_guess(); -/* Don't supply default password for web interface */ -subobj.ADMINPASS = ""; - -f.add("REALM", "DNS Domain Name"); -f.add("DOMAIN", "NetBIOS Domain Name"); -f.add("ADMIN", "Administrator Username"); -f.add("ADMINPASS", "Administrator Password", "password"); -f.add("HOSTNAME", "My Hostname"); -f.add("HOSTIP", "My Host's IP"); -f.add("DEFAULTSITE", "Default Site"); -f.submit[0] = "Migrate"; -f.submit[1] = "Cancel"; - -if (form['submit'] == "Cancel") { - redirect("/"); -} - -if (form['submit'] == "Migrate") { - for (r in form) { - subobj[r] = form[r]; - } -} - -for (i=0;iWe need the administrator password for the " + subobj.DOMAIN + " domain to proceed. Please try again."); - f.display(); - } else if (!provision_validate(subobj, writefln)) { - f.display(); - } else if (strupper(lp.get("server role")) == "PDC") { - writefln("You need to set 'server role' to 'member server' before starting the migration process"); - } else { - var creds = credentials_init(); - var samdb; - creds.set_username(form.ADMIN); - creds.set_password(form.ADMINPASS); - creds.set_domain(form.DOMAIN); - creds.set_realm(form.REALM); - - var info = new Object(); - var paths = provision_default_paths(subobj); - var session_info = session.authinfo.session_info; - var credentials = session.authinfo.credentials; - - info.credentials = credentials; - info.session_info = session_info; - info.message = writefln; - info.subobj = subobj; - - /* Setup a basic database structure, but don't setup any users */ - if (!provision(subobj, writefln, true, paths, - session_info, credentials)) { - writefln("Provision failed!"); - - /* Join domain */ - } else if (!join_domain(form.DOMAIN, form.HOSTNAME, misc.SEC_CHAN_BDC, creds, writefln)) { - writefln("Domain Join failed!"); - - /* Vampire */ - } else if (!vampire(form.DOMAIN, session.authinfo.session_info, - session.authinfo.credentials, writefln)) { - writefln("Failed to syncronsise remote domain into local database!"); - } else if (!provision_dns(subobj, writefln, paths, - session.authinfo.session_info, session.authinfo.credentials)) { - writefln("DNS Provision failed!"); - } else if (!(samdb = open_ldb(info, paths.samdb, false))) { - writefln("Opening " + paths.samdb + " failed!"); - info.samdb = samdb; - } else if (!setup_name_mappings(info, samdb)) { - writefln("Setup of name mappings failed!"); - } else { - var zonepath = paths.dns; - %> -

Database migrated!

- -You need to do the following to complete the process: - -
    -
  • Install the @@zonepath zone file into your bind install, and restart bind -
  • Change your smb.conf to set "server role = pdc" -
  • Shutdown your existing PDC and any other DCs -
  • Restart smbd -
- <% - } - } -} else { - f.display(); -} -%> - - -<% page_footer(); %> -- cgit