diff options
author | Andrew Tridgell <tridge@samba.org> | 2008-05-22 16:09:10 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2008-05-22 16:09:10 +1000 |
commit | fd7dc46f50d063a3bd4951e8b9bbc17b7632f0c5 (patch) | |
tree | 6e6b4079ecf50b42b862d0f8accc392e5f061cb8 /source4/setup | |
parent | af82204f4355ac9011b61019bbbe40e7e3632d4c (diff) | |
parent | 8172f3eb220575d40f9ab5129d36e4e0003dee56 (diff) | |
download | samba-fd7dc46f50d063a3bd4951e8b9bbc17b7632f0c5.tar.gz samba-fd7dc46f50d063a3bd4951e8b9bbc17b7632f0c5.tar.bz2 samba-fd7dc46f50d063a3bd4951e8b9bbc17b7632f0c5.zip |
Merge commit 'origin/v4-0-test' into v4-0-test
(This used to be commit d7f3348c891e14de0e1b195714468ff998400f60)
Diffstat (limited to 'source4/setup')
-rwxr-xr-x[-rw-r--r--] | source4/setup/enableaccount | 8 | ||||
-rw-r--r-- | source4/setup/krb5.conf | 17 | ||||
-rw-r--r-- | source4/setup/named.conf | 14 | ||||
-rwxr-xr-x | source4/setup/newuser | 2 | ||||
-rwxr-xr-x | source4/setup/provision | 4 | ||||
-rw-r--r-- | source4/setup/provision_basedn_modify.ldif | 2 | ||||
-rw-r--r-- | source4/setup/setpassword | 7 | ||||
-rwxr-xr-x | source4/setup/tests/blackbox_newuser.sh | 21 | ||||
-rwxr-xr-x | source4/setup/tests/blackbox_provision.sh | 19 | ||||
-rwxr-xr-x | source4/setup/tests/blackbox_setpassword.sh | 22 | ||||
-rwxr-xr-x | source4/setup/upgrade | 4 |
11 files changed, 78 insertions, 42 deletions
diff --git a/source4/setup/enableaccount b/source4/setup/enableaccount index 849b515675..061997b804 100644..100755 --- a/source4/setup/enableaccount +++ b/source4/setup/enableaccount @@ -5,17 +5,19 @@ # Copyright Jelmer Vernooij 2008 # Released under the GNU GPL version 3 or later # +import os, sys + +sys.path.insert(0, os.path.join(os.path.dirname(sys.argv[0]), "../bin/python")) import samba.getopt as options import optparse import pwd -import sys import ldb -from auth import system_session +from samba.auth import system_session from samba.samdb import SamDB -parser = optparse.OptionParser("setpassword [username] [options]") +parser = optparse.OptionParser("enableaccount [username] [options]") sambaopts = options.SambaOptions(parser) parser.add_option_group(sambaopts) parser.add_option_group(options.VersionOptions(parser)) diff --git a/source4/setup/krb5.conf b/source4/setup/krb5.conf new file mode 100644 index 0000000000..7dad63de73 --- /dev/null +++ b/source4/setup/krb5.conf @@ -0,0 +1,17 @@ +[libdefaults] + default_realm = ${REALM} + dns_lookup_realm = false + dns_lookup_kdc = false + ticket_lifetime = 24h + forwardable = yes + +[realms] + ${REALM} = { + kdc = ${HOSTNAME}.${DNSDOMAIN}:88 + admin_server = ${HOSTNAME}.${DNSDOMAIN}:749 + default_domain = ${DNSDOMAIN} + } + +[domain_realm] + .${DNSDOMAIN} = ${REALM} + ${DNSDOMAIN} = ${REALM} diff --git a/source4/setup/named.conf b/source4/setup/named.conf index 9cf0b48a7c..4f98bbd914 100644 --- a/source4/setup/named.conf +++ b/source4/setup/named.conf @@ -66,20 +66,6 @@ zone "123.168.192.in-addr.arpa" in { tkey-gssapi-credential "DNS/${DNSDOMAIN}"; tkey-domain "${REALM}"; -# - Add settings for the ${REALM} realm to the Kerberos configuration on the DNS -# server. The easiest way is to add the following blocks to the appropriate -# sections in /etc/krb5.conf: -[realms] - ${REALM} = { - kdc = ${HOSTNAME}.${DNSDOMAIN}:88 - admin_server = ${HOSTNAME}.${DNSDOMAIN}:749 - default_domain = ${DNSDOMAIN} - } - -[domain_realm] - .${DNSDOMAIN} = ${REALM} - ${DNSDOMAIN} = ${REALM} - # - Modify BIND init scripts to pass the location of the generated keytab file. # Fedora 8 & later provide a variable named KEYTAB_FILE in /etc/sysconfig/named # for this purpose: diff --git a/source4/setup/newuser b/source4/setup/newuser index 26bac76f02..991afa36d8 100755 --- a/source4/setup/newuser +++ b/source4/setup/newuser @@ -15,7 +15,7 @@ import samba.getopt as options import optparse import pwd from getpass import getpass -from auth import system_session +from samba.auth import system_session from samba.samdb import SamDB parser = optparse.OptionParser("newuser [options] <username> [<password>]") diff --git a/source4/setup/provision b/source4/setup/provision index 2579bc4f19..c1d6cd157a 100755 --- a/source4/setup/provision +++ b/source4/setup/provision @@ -30,10 +30,10 @@ import os, sys sys.path.insert(0, "bin/python") import samba -import param -from auth import system_session +from samba.auth import system_session import samba.getopt as options +from samba import param from samba.provision import (provision, FILL_FULL, FILL_NT4SYNC, FILL_DRS) diff --git a/source4/setup/provision_basedn_modify.ldif b/source4/setup/provision_basedn_modify.ldif index f5e1bb5add..63332e937b 100644 --- a/source4/setup/provision_basedn_modify.ldif +++ b/source4/setup/provision_basedn_modify.ldif @@ -75,6 +75,6 @@ subRefs: ${CONFIGDN} subRefs: ${SCHEMADN} - replace: gPLink -gPLink: [LDAP://CN={${POLICYGUID}},CN=Policies,CN=System,${DOMAINDN};2] +gPLink: [LDAP://CN={${POLICYGUID}},CN=Policies,CN=System,${DOMAINDN};0] - ${DOMAINGUID_MOD} diff --git a/source4/setup/setpassword b/source4/setup/setpassword index 977a6a5ee8..65770e1f4d 100644 --- a/source4/setup/setpassword +++ b/source4/setup/setpassword @@ -6,12 +6,17 @@ # Released under the GNU GPL version 3 or later # +import os, sys + +# Find right directory when running from source tree +sys.path.insert(0, "bin/python") + import samba.getopt as options import optparse import pwd import sys from getpass import getpass -from auth import system_session +from samba.auth import system_session from samba.samdb import SamDB parser = optparse.OptionParser("setpassword [username] [options]") diff --git a/source4/setup/tests/blackbox_newuser.sh b/source4/setup/tests/blackbox_newuser.sh new file mode 100755 index 0000000000..fed5f7d263 --- /dev/null +++ b/source4/setup/tests/blackbox_newuser.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +if [ $# -lt 2 ]; then +cat <<EOF +Usage: blackbox_newuser.sh PREFIX CONFIGURATION +EOF +exit 1; +fi + +PREFIX="$1" +CONFIGURATION="$2" +shift 2 + +. `dirname $0`/../../../testprogs/blackbox/subunit.sh + + +testit "simple-dc" $PYTHON ./setup/provision $CONFIGURATION --server-role="dc" --domain=FOO --realm=foo.example.com --domain-sid=S-1-5-21-4177067393-1453636373-93818738 --targetdir=$PREFIX/simple-dc + +testit "newuser" $PYTHON ./setup/newuser --configfile=$PREFIX/simple-dc/etc/smb.conf testuser testpass + +exit $failed diff --git a/source4/setup/tests/blackbox_provision.sh b/source4/setup/tests/blackbox_provision.sh index 19f37cef2d..2afa9dc952 100755 --- a/source4/setup/tests/blackbox_provision.sh +++ b/source4/setup/tests/blackbox_provision.sh @@ -11,21 +11,7 @@ PREFIX="$1" CONFIGURATION="$2" shift 2 -testit() { - name="$1" - shift - cmdline="$*" - echo "test: $name" - $cmdline - status=$? - if [ x$status = x0 ]; then - echo "success: $name" - else - echo "failure: $name" - failed=`expr $failed + 1` - fi - return $status -} +. `dirname $0`/../../../testprogs/blackbox/subunit.sh testit "simple-default" $PYTHON ./setup/provision $CONFIGURATION --domain=FOO --realm=foo.example.com --targetdir=$PREFIX/simple-default testit "simple-dc" $PYTHON ./setup/provision $CONFIGURATION --server-role="dc" --domain=FOO --realm=foo.example.com --domain-sid=S-1-5-21-4177067393-1453636373-93818738 --targetdir=$PREFIX/simple-dc @@ -34,9 +20,6 @@ testit "simple-standalone" $PYTHON ./setup/provision $CONFIGURATION --server-rol testit "blank-dc" $PYTHON ./setup/provision $CONFIGURATION --server-role="dc" --domain=FOO --realm=foo.example.com --domain-sid=S-1-5-21-4177067393-1453636373-93818738 --targetdir=$PREFIX/blank-dc --blank testit "partitions-only-dc" $PYTHON ./setup/provision $CONFIGURATION --server-role="dc" --domain=FOO --realm=foo.example.com --domain-sid=S-1-5-21-4177067393-1453636373-93818738 --targetdir=$PREFIX/partitions-only-dc --partitions-only -testit "newuser" $PYTHON ./setup/newuser --configfile=$PREFIX/simple-dc/etc/smb.conf testuser testpass -testit "setpassword" $PYTHON ./setup/setpassword --configfile=$PREFIX/simple-dc/etc/smb.conf testuser --newpassword=testpass - reprovision() { $PYTHON ./setup/provision $CONFIGURATION --domain=FOO --realm=foo.example.com --targetdir="$PREFIX/reprovision" $PYTHON ./setup/provision $CONFIGURATION --domain=FOO --realm=foo.example.com --targetdir="$PREFIX/reprovision" diff --git a/source4/setup/tests/blackbox_setpassword.sh b/source4/setup/tests/blackbox_setpassword.sh new file mode 100755 index 0000000000..725466150c --- /dev/null +++ b/source4/setup/tests/blackbox_setpassword.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +if [ $# -lt 2 ]; then +cat <<EOF +Usage: blackbox_setpassword.sh PREFIX CONFIGURATION +EOF +exit 1; +fi + +PREFIX="$1" +CONFIGURATION="$2" +shift 2 + +. `dirname $0`/../../../testprogs/blackbox/subunit.sh + +testit "simple-dc" $PYTHON ./setup/provision $CONFIGURATION --server-role="dc" --domain=FOO --realm=foo.example.com --domain-sid=S-1-5-21-4177067393-1453636373-93818738 --targetdir=$PREFIX/simple-dc + +testit "newuser" $PYTHON ./setup/newuser --configfile=$PREFIX/simple-dc/etc/smb.conf testuser testpass + +testit "setpassword" $PYTHON ./setup/setpassword --configfile=$PREFIX/simple-dc/etc/smb.conf testuser --newpassword=testpass + +exit $failed diff --git a/source4/setup/upgrade b/source4/setup/upgrade index b1d9ffa37c..03c6747d4e 100755 --- a/source4/setup/upgrade +++ b/source4/setup/upgrade @@ -11,10 +11,10 @@ import os, sys # Find right directory when running from source tree sys.path.insert(0, "bin/python") -import param import samba import samba.getopt as options -from auth import system_session +from samba import param +from samba.auth import system_session parser = optparse.OptionParser("upgrade [options] <libdir> <smbconf>") sambaopts = options.SambaOptions(parser) |