From 142fbfb3c1f9f8cda7f0edaa801f8345f23d805f Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 28 Mar 2008 21:57:15 +1100 Subject: Fix and test python scripts and kerberos This fixes up the python credentials interface in a number of areas, with the aim of supporting '-k yes' as a command line option. (This enables the use of kerberos). As such, I've had to change the get_credentials call to take a loadparm context, so that the credentials can be initialised correctly. The test_kinit script has been modified to prove that this continues to work, as well as to provide greater code coverage of the kerberos paths. Andrew Bartlett (This used to be commit 727ef40c2b56910028ef3c1092b8eab1bfa6ce63) --- source4/setup/provision | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source4/setup/provision') diff --git a/source4/setup/provision b/source4/setup/provision index b0363d8a8f..cf08036f90 100755 --- a/source4/setup/provision +++ b/source4/setup/provision @@ -111,7 +111,8 @@ if opts.realm is None or opts.domain is None: parser.print_usage() sys.exit(1) -smbconf = sambaopts.get_loadparm().configfile() +lp = sambaopts.get_loadparm() +smbconf = lp.configfile() if opts.aci is not None: print "set ACI: %s" % opts.aci @@ -123,7 +124,7 @@ elif opts.server_role == "member": else: server_role = opts.server_role -creds = credopts.get_credentials() +creds = credopts.get_credentials(lp) setup_dir = opts.setupdir if setup_dir is None: -- cgit From 238a1a52f1fd3cce0a0fd980c1717c8540a1c7a1 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 29 Mar 2008 17:17:56 +1100 Subject: Rework 'compleated' message in provision to be more useful. In particular, this should draw attention to accidential 'standalone' server provisions and therefore cause less frustration. Andrew Bartlett (This used to be commit e906ae041a2b589ffceff97b74f7c4b01386382a) --- source4/setup/provision | 9 --------- 1 file changed, 9 deletions(-) (limited to 'source4/setup/provision') diff --git a/source4/setup/provision b/source4/setup/provision index cf08036f90..e354f4d0bb 100755 --- a/source4/setup/provision +++ b/source4/setup/provision @@ -149,12 +149,3 @@ provision(setup_dir, message, aci=opts.aci, serverrole=server_role, ldap_backend=opts.ldap_backend, ldap_backend_type=opts.ldap_backend_type) - -message("To reproduce this provision, run with:") -def shell_escape(arg): - if " " in arg: - return '"%s"' % arg - return arg -message(" ".join([shell_escape(arg) for arg in sys.argv])) - -message("All OK") -- cgit From 2ab6dd9ea58c7f09791f45077df084447fc7de69 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 2 Apr 2008 11:38:58 +1100 Subject: Remove references to setting the host GUID, as the repl_meta_data module prohibits it anyway. Andrew Bartlett (This used to be commit c5b287c056855892f30fbbf32efe7d65da31ce91) --- source4/setup/provision | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'source4/setup/provision') diff --git a/source4/setup/provision b/source4/setup/provision index e354f4d0bb..30067f5592 100755 --- a/source4/setup/provision +++ b/source4/setup/provision @@ -52,14 +52,12 @@ parser.add_option("--domain-sid", type="string", metavar="SID", help="set domainsid (otherwise random)") parser.add_option("--policy-guid", type="string", metavar="GUID", help="set policy guid") +parser.add_option("--invocationid", type="string", metavar="GUID", + help="set invocationid (otherwise random)") parser.add_option("--host-name", type="string", metavar="HOSTNAME", help="set hostname") parser.add_option("--host-ip", type="string", metavar="IPADDRESS", help="set ipaddress") -parser.add_option("--host-guid", type="string", metavar="GUID", - help="set hostguid (otherwise random)") -parser.add_option("--invocationid", type="string", metavar="GUID", - help="set invocationid (otherwise random)") parser.add_option("--adminpass", type="string", metavar="PASSWORD", help="choose admin password (otherwise random)") parser.add_option("--krbtgtpass", type="string", metavar="PASSWORD", @@ -141,7 +139,7 @@ provision(setup_dir, message, samdb_fill=samdb_fill, realm=opts.realm, domain=opts.domain, domainguid=opts.domain_guid, domainsid=opts.domain_sid, policyguid=opts.policy_guid, hostname=opts.host_name, - hostip=opts.host_ip, hostguid=opts.host_guid, + hostip=opts.host_ip, invocationid=opts.invocationid, adminpass=opts.adminpass, krbtgtpass=opts.krbtgtpass, machinepass=opts.machinepass, dnspass=opts.dnspass, root=opts.root, nobody=opts.nobody, -- cgit From 3c0c6acc594fba1f1d28e49cb105c99fa1649a18 Mon Sep 17 00:00:00 2001 From: Andrew Kroeger Date: Tue, 1 Apr 2008 19:51:24 -0500 Subject: provision: Add support for IPv6 (bz #4593). (This used to be commit 8585a3c77d5dfe97bca3f08716fc06ac2819f578) --- source4/setup/provision | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source4/setup/provision') diff --git a/source4/setup/provision b/source4/setup/provision index e354f4d0bb..f940b30744 100755 --- a/source4/setup/provision +++ b/source4/setup/provision @@ -55,7 +55,9 @@ parser.add_option("--policy-guid", type="string", metavar="GUID", parser.add_option("--host-name", type="string", metavar="HOSTNAME", help="set hostname") parser.add_option("--host-ip", type="string", metavar="IPADDRESS", - help="set ipaddress") + help="set IPv4 ipaddress") +parser.add_option("--host-ip6", type="string", metavar="IP6ADDRESS", + help="set IPv6 ipaddress") parser.add_option("--host-guid", type="string", metavar="GUID", help="set hostguid (otherwise random)") parser.add_option("--invocationid", type="string", metavar="GUID", @@ -141,7 +143,7 @@ provision(setup_dir, message, samdb_fill=samdb_fill, realm=opts.realm, domain=opts.domain, domainguid=opts.domain_guid, domainsid=opts.domain_sid, policyguid=opts.policy_guid, hostname=opts.host_name, - hostip=opts.host_ip, hostguid=opts.host_guid, + hostip=opts.host_ip, hostip6=opts.host_ip6, hostguid=opts.host_guid, invocationid=opts.invocationid, adminpass=opts.adminpass, krbtgtpass=opts.krbtgtpass, machinepass=opts.machinepass, dnspass=opts.dnspass, root=opts.root, nobody=opts.nobody, -- cgit From 67bf4bab3ddaf8d1dfaee92007700d8f05a1c191 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 2 Apr 2008 12:31:24 +1100 Subject: Fix conflicts in setup/provision script. (This used to be commit 696b58f5dd8370b7ee0670c7a3e5db10234b41ff) --- source4/setup/provision | 8 -------- 1 file changed, 8 deletions(-) (limited to 'source4/setup/provision') diff --git a/source4/setup/provision b/source4/setup/provision index afda9eeade..259bd814a4 100755 --- a/source4/setup/provision +++ b/source4/setup/provision @@ -57,17 +57,9 @@ parser.add_option("--invocationid", type="string", metavar="GUID", parser.add_option("--host-name", type="string", metavar="HOSTNAME", help="set hostname") parser.add_option("--host-ip", type="string", metavar="IPADDRESS", -<<<<<<< HEAD:source/setup/provision - help="set ipaddress") -======= help="set IPv4 ipaddress") parser.add_option("--host-ip6", type="string", metavar="IP6ADDRESS", help="set IPv6 ipaddress") -parser.add_option("--host-guid", type="string", metavar="GUID", - help="set hostguid (otherwise random)") -parser.add_option("--invocationid", type="string", metavar="GUID", - help="set invocationid (otherwise random)") ->>>>>>> 8585a3c77d5dfe97bca3f08716fc06ac2819f578:source/setup/provision parser.add_option("--adminpass", type="string", metavar="PASSWORD", help="choose admin password (otherwise random)") parser.add_option("--krbtgtpass", type="string", metavar="PASSWORD", -- cgit