1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

1989 Commits

Author SHA1 Message Date
Kai Blin
56058ea597 s4 dns: use the internal DNS server per default 2012-09-12 16:51:29 +02:00
Kai Blin
76801b502d s4 dns: Run python tests in fl2003dc env 2012-09-12 16:51:29 +02:00
Andrew Bartlett
ac804f0d7f smbd-posix_acls: Use a IDL union to store the ACL entry
This is a clearer, long-term-stable structure we can hash without
risking it changing.

Andrew Bartlett
2012-09-12 05:26:16 +02:00
Andrew Bartlett
6fbce905db provision: Only give the "no posix ACLs" exception if we could not set the SD
This will allow us to run make test on all platforms again, as we emululate the posix ACLs using the fake_acls
module.  By then testing smbd.have_posix_acls() we gain a more specific error message.

Andrew Bartlett
2012-09-11 16:25:36 +02:00
Stefan Metzmacher
a4fc79f8fc s4:samba-tool: add 'samba-tool domain provision'
This is mostly a copy of the standalone source4/setup/provision.

metze
2012-09-11 08:35:49 +02:00
Stefan Metzmacher
ca3f285390 s4:python/netcmd: give the Commad implementations access to the raw arguments
metze
2012-09-11 08:23:56 +02:00
Stefan Metzmacher
7f98cf1698 s4:samba-tool: remove unused code in testparm.py
metze
2012-09-11 08:23:56 +02:00
Andrew Bartlett
0d99175f2a join.py: Only replicate DNS zones if the source DC had DNS zones
This avoid folks needing to specify --dns-backend=NONE

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Sep  6 04:48:55 CEST 2012 on sn-devel-104
2012-09-06 04:48:55 +02:00
Andrew Bartlett
7b86c18f38 selftest: Add python blackbox tests for samba-tool ntacl get/set
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Sep  5 15:47:55 CEST 2012 on sn-devel-104
2012-09-05 15:47:55 +02:00
Andrew Bartlett
f9cee8d832 samba_tool: Improve samba-tool ntacl get/set to use the local sam.ldb SID
This gets the SID for the local machine correctly.

We also add options for --use-ntvfs and --use-s3fs to help control
exactly which database is being read and written.

Andrew Bartlett
2012-09-05 14:12:20 +02:00
Andrew Bartlett
7b5ba30138 samba_tool: Fix ntacl get to correctly output in sddl 2012-09-05 14:12:19 +02:00
Andrew Bartlett
c19208e93c s4-provision: Fix error message to contain the string SSDL of the failed-to-match ACL 2012-09-05 14:12:19 +02:00
Andrew Bartlett
4437547afa s4-selftest: Try a more complex ACL - this example from a GPO
Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Sep  4 11:30:17 CEST 2012 on sn-devel-104
2012-09-04 11:30:17 +02:00
Andrew Bartlett
97a1f8d20b s4-selftest: Try to make ntacl unit tests better match their names
We are trying to test combinations of setting and getting via the VFS
and directly to the underlying DB.

Andrew Bartlett
2012-09-04 09:52:23 +02:00
Andrew Bartlett
30253c11cc s4-samba-tool: Ensure we also sync the SACL as well as the DACL during sysvolreset 2012-09-04 09:52:23 +02:00
Andrew Bartlett
9983ad7a80 s3-passdb: Rename pdb_samba4 to samba_dsdb and autoconfigure when we are a AD DC
The name samba_dsdb is not ideal, but it matches the primary ldb
module we use, and more importantly it avoids having '4' in the name.
We should slowly avoid using the term samba4 in long-term places like
the smb.conf because it is confusing to users given we are shipping
Samba 4.0 as an AD DC as well as all the other supported roles (domain
member/standalone server/classic DC)

Additionally, samba4 will be an odd name when we eventually release
Samba 5.0!

samba4 remains accepted as an alias to ensure existing smb.conf files
load, but to allow changes here in the future, we set the value during
the smb.conf load, and not during the provision when we are an AD DC.

This simplifies the default smb.conf for the vast majority of our
users and reduces the number of things listed in smb.conf files that
we later have to work around if we wish to change the
name/implementation of the passdb glue module again.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Sep  4 04:45:16 CEST 2012 on sn-devel-104
2012-09-04 04:45:16 +02:00
Andrew Bartlett
2dd0e7141f s4-classicupgrade: Show more clearly what is wrong with the Adminstrator SID 2012-09-03 19:24:10 +10:00
Andrew Bartlett
9e441c4ed9 s3-classicupgrade: Fix import from ldap
We must not reference result before provision(), and do not need
session_info and lp for reading a normal ldap backend anyway.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug 28 09:49:39 CEST 2012 on sn-devel-104
2012-08-28 09:49:39 +02:00
Andrew Bartlett
444c9ffad7 s4-classicupgrade: Do the setting of the sysvol ACLs last, after idmap is configured
This will allow files to be correctly owned by the idmap that is imported.

This appears to fix an issue that came up after s3fs-compatible ACLs were
merged into provision.

Andrew Bartlett
2012-08-28 07:57:30 +10:00
Andrew Bartlett
5aa9a6c936 s3-passdb: Allow reload of the static passdb from python
This is then used in provision when the passdb backend is forced.

Andrew Bartlett
2012-08-28 07:57:30 +10:00
Andrew Bartlett
8c205395c6 s4-dsdb: Add secrets_tdb_sync - an ldb module to keep secrets.tdb in sync
secrets_tdb_sync is a new ldb module designed to sync secrets.ldb
entries with the secrets.tdb file.

While not ideal to keep two copies of this data, this routine will
assist in allowing the samba-tool domain join code to operate
correctly in most cases where winbindd and smbd are used.

Andrew Bartlett
2012-08-28 07:57:29 +10:00
Andrew Bartlett
d5b9972215 s4-classicupgrade: Read WINS DB before the provision 2012-08-28 07:57:29 +10:00
Andrew Bartlett
85f1c4fdfd s4-classicupgrade: Do all the queries of data before the provision()
This allows provision to change the s3 smb.conf settings if required.

Andrew Bartlett
2012-08-28 07:57:29 +10:00
Andrew Bartlett
738f4ac058 s4-classicupgrade: Use s3param.get_context() instead of result.lp
We should not need the guessed values here, but by changing to using the s3 loadparm context
we can move this block to before the provision.

Andrew Bartlett
2012-08-28 07:57:29 +10:00
Andrew Bartlett
123ee7f9b5 s4-selftest: Add test for samba-tool ntacl sysvolcheck 2012-08-23 15:02:26 +02:00
Andrew Bartlett
ebcdc4a36b s4-samba-tool: Add samba-tool ntacl sysvolcheck command
This command verifies that the current on-disk ACLs match the directory and
the defaults from provision.

Unlike sysvolreset, this does not change any of the permissions.

Andrew Bartlett
2012-08-23 15:02:26 +02:00
Andrew Bartlett
0aed29105e s3-smbd: Add security_info_wanted argument to get_nt_acl_no_snum
I need to get at the owner, group, DACL and SACL when testing correct
ACL storage.

Andrew Bartlett
2012-08-23 15:02:26 +02:00
Andrew Bartlett
7cf50b9f30 s4-selftest: Add testing of samba-tool ntacl sysvolreset 2012-08-23 15:02:26 +02:00
Andrew Bartlett
7e7ed72bbe s4-provision: Fix internal documentation 2012-08-23 15:02:26 +02:00
Andrew Bartlett
51e3547426 s3-pysmbd: Allow a mode to be specified for the simple ACL
The additional group for the ACL is now optional.

Andrew Bartlett
2012-08-23 15:02:26 +02:00
Andrew Bartlett
8f909199c4 s4-samba-tool: Add 'samba-tool ntacl sysvolreset' tool
This will reset the NT ACL on the sysvol share to the default from
provision, with GPO objects matching the LDAP ACL (as required).

Andrew Bartlett
2012-08-23 15:02:26 +02:00
Andrew Bartlett
4fe344ef05 selftest: Cope with the multiple possible representations of -1 in posixacl.py 2012-08-23 15:02:26 +02:00
Andrew Bartlett
bd00c92865 selftest: Extend posixacl test to check the actual ACL
Needing to be able to write this test is the primary reason I have
been reworking the VFS and posix ACL layer over the past few weeks.
By exposing the POSIX ACL as a IDL object we can eaisly manipulate it
in python, and then verify that the ACL was handled correctly.

This ensures the when we write an ACL in provision, that it will
indeed allow that access at the FS layer.

We need to extend this beyond just the critical two ACLs set during
provision, to also include some special (hard) cases involving the
merging of ACE entries, as this is the most delicate part of the ACL
transfomation.

A similar test should also be written to read the posix ACL and the
mapped NT ACL on a file that has never had an NT ACL set.

Andrew Bartlett
2012-08-23 15:02:26 +02:00
Andrew Bartlett
318b8cb4fa selftest: Add a test of the NT ACL -> posix ACL mapping layer
This is the start of what will be a series of tests confirming exactly how
some NT ACLs are mapped to posix ACLs.

Andrew Bartlett
2012-08-23 15:02:26 +02:00
Andrew Bartlett
b1825c6421 s4-scripting: Redefine getntacl() as accessing via the smbd VFS or directly
This allows us to write tests that compare the smbd vfs with what is
in the DB or xattr.

Andrew Bartlett
2012-08-23 15:02:26 +02:00
Andrew Bartlett
a778662da8 s4-provision: set POSIX ACLs to for use with the smbd file server (s3fs)
This handles the fact that smbd will rarely override the POSIX ACL enforced by
the kernel.  This has caused issues with the creation of group policies by
other members of the Domain Admins group.

Andrew Bartlett
2012-08-23 15:02:26 +02:00
Andrew Bartlett
a58ac39a5a s4-upgradeprovision: Use ntvfs in reference provision
We do not need filesystem ACLs set when creating the reference provision, so it is
easier to use the NTVFS backend as it does not cause trouble with make test.

Andrew Bartlett
2012-08-23 15:02:25 +02:00
Andrew Bartlett
97b13799ce s4-classicupgrade: Add --use-ntvfs option
This is an odd option, but is needed because I wish to add assertions about
ACL setting that will not work in make test without the vfs_fake_acls module
loaded.

Andrew Bartlett
2012-08-22 01:31:57 +02:00
Andrew Bartlett
b5c2747cad s4-provision: pass use_ntvfs from C wrappers and set to true in tests/vampire
None of these cases need the complexity of the s3fs backend.

Andrew Bartlett
2012-08-22 01:31:57 +02:00
Volker Lendecke
f3b69da2ae s3-libsmb: Add a simple test for python bindings
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Aug 16 22:49:06 CEST 2012 on sn-devel-104
2012-08-16 22:49:06 +02:00
Andrew Bartlett
f9b9433b75 s4-selftest: Fix test name for samba.tests.dcerpc.bare 2012-08-15 16:28:03 +02:00
Stefan Metzmacher
4e5e302a10 s4:samba-tool/drs: print the dns name of the server belonging to a connection
Pair-Programmed-With: Björn Baumbach <bb@sernet.de>

metze
2012-08-14 17:17:29 +02:00
Wesley Young
a57c5eb848 s4-classicupgrade: Tests if sam policies exist before trying to import them.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-14 08:37:48 +10:00
Andrew Bartlett
fdd07e87c6 s4-dsdb: Explain better what records are written during schema set
This is controlled by setting write_indices_and_attributes.

Andrew Bartlett
2012-08-10 10:18:28 +10:00
Andrew Bartlett
a117fd6d11 s4-dsdb: Ensure we have indexing enabled during the provision
Because we set the schema before we connected the ldb to a file, the @INDEX records
were not added until next startup.  This cost 100% more time in running provision on
my laptop.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Aug  9 08:20:36 CEST 2012 on sn-devel-104
2012-08-09 08:20:36 +02:00
Andrew Bartlett
ef87b4e4f1 s4-pydsdb: Provide control of if we should write index attributes when reloading a schema
This allows us to carefully control the loading of the schema.

Andrew Bartlett
2012-08-09 06:39:20 +02:00
Andrew Bartlett
33705f4cc1 s4-scripting: Remove unused variables from ntacl tests
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug  7 11:15:41 CEST 2012 on sn-devel-104
2012-08-07 11:15:40 +02:00
Stefan Metzmacher
86ee590901 s4:domain join: setup RODC invocationId
Pair-Programmed-With: Björn Baumbach <bb@sernet.de>

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Aug  4 18:27:21 CEST 2012 on sn-devel-104
2012-08-04 18:27:21 +02:00
Andrew Bartlett
2dfb2a4e45 s4-samba-tool ldapcmp: Fix synopsis
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Jul 30 06:25:46 CEST 2012 on sn-devel-104
2012-07-30 06:25:46 +02:00
Andrew Bartlett
14bd5ca68f s4-samba-tool ldapcmp: Add ridNextRID and rIDPreviousAllocationPool as per-DC attributes 2012-07-30 12:30:28 +10:00
Andrew Bartlett
6a37b55dfb s4-dbcheck: Add lastKnownParent when moving an object to lostAndFound
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Jul 28 05:40:43 CEST 2012 on sn-devel-104
2012-07-28 05:40:43 +02:00
Geza Gemes
e2cea8fbea s4-classicupgrade: Add unix attributes during upgrade
Signed-off-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Jul 22 13:20:20 CEST 2012 on sn-devel-104
2012-07-22 13:20:19 +02:00
Andrew Bartlett
fc36ebfa78 s4-dbcheck: Check for and correct incorrect instanceType values 2012-07-18 09:32:53 +02:00
Geza Gemes
70de501d6a s4-provision: Provide YP/NIS subtree to allow ADUC to see and set rfc2307 attrs
When provisioning with --use_rfc2307=yes populate the subtree:
CN=ypServ30,CN=RpcServices,CN=System,${DOMAINDN} This makes it
possible to manipulate the posix attributes via ADUC

(commit message adjusted by abartlet)

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-07-13 06:00:17 +02:00
Andrew Bartlett
f9d90922f5 s4-dbcheck: Check for an object without a parent
Such objects are then moved to the appropriate LostAndFound container,
just as they would be if replicated.

Andrew Bartlett
2012-07-06 22:55:50 +10:00
Andrew Bartlett
023508ed17 pydsdb: Add bindings for dsdb_wellknown_dn() 2012-07-06 22:55:50 +10:00
Andrew Bartlett
e4077a8ca5 s4-pydsdb: Add bindings for dsdb_find_nc_root() 2012-07-06 22:45:34 +10:00
Andrew Bartlett
8f443895f2 s4-classicupgrade: Demote any other 'BDC' accounts back to a member server during upgrade
This makes it clear that they cannot be a DC until they are upgraded with
samba-tool domain dcpromo.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Jul  6 09:59:13 CEST 2012 on sn-devel-104
2012-07-06 09:59:13 +02:00
Andrew Bartlett
1c86ab9c50 s4-samba-tool: Provide a samba-tool domain dcpromo that upgrades a member to a DC
This command is like dcpromo in that it upgrades the existing workstation account
to be a domain controller.

The SID (and therefore any file ownerships) is preserved.

Andrew Bartlett
2012-07-06 08:10:18 +02:00
Amitay Isaacs
01a425e534 samba-tool: gpo: Update copyright
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Tue Jul  3 09:10:21 CEST 2012 on sn-devel-104
2012-07-03 09:10:21 +02:00
Amitay Isaacs
5c9ecb4082 samba-tool: gpo: Improve error messages
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
2012-07-03 15:20:42 +10:00
Amitay Isaacs
df4a6e3a3f samba-tool: gpo: Add del subcommand to delete GPO
Thanks to Denis Bonnenfant <denis.bonnenfant@diderot.org> for patch.
2012-07-03 15:20:42 +10:00
Amitay Isaacs
8768f4fc34 samba-tool: gpo: Add listcontainers subcommand to list containers using given GPO
Thanks to Denis Bonnenfant <denis.bonnenfant@diderot.org> for patch.
2012-07-03 15:20:42 +10:00
Amitay Isaacs
0365df93e6 samba-tool: gpo: Use utility function dc_url() to set the connection url
In create and fetch subcommands, we also need to know DC hostname. So first
find a DC and use DC hostname to construct connection url. If ldap:// url is
specified with -H, then use that to construct DC hostname.
2012-07-03 15:20:42 +10:00
Amitay Isaacs
a9c4336733 samba-tool: gpo: Refactor code using utility functions 2012-07-03 15:20:42 +10:00
Amitay Isaacs
5ca24346bf samba-tool: gpo: Add utility functions get_gpo_containers and del_gpo_link
Thanks to Denis Bonnenfant <denis.bonnenfant@diderot.org> for patch
2012-07-03 15:20:42 +10:00
Amitay Isaacs
807ff1e343 samba-tool: Fix indentation
Thanks to Denis Bonnenfant <denis.bonnenfant@diderot.org> for patch.
2012-07-03 15:20:41 +10:00
Amitay Isaacs
e93ed5f69a samba-tool: gpo: Use gpo (id) instead of gpo_dn (DN)
Thanks to Denis Bonnenfant <denis.bonnenfant@diderot.org> for patch.
2012-07-03 15:20:41 +10:00
Amitay Isaacs
963f0df179 samba-tool: gpo: Correct the attribute name from gPlink to gPLink
Thanks to Denis Bonnenfant <denis.bonnenfant@diderot.org> for patch.
2012-07-03 15:20:41 +10:00
Amitay Isaacs
7563032acd samba-tool: gpo: Fix policy DN
Thanks to Denis Bonnenfant <denis.bonnenfant@diderot.org> for patch.
2012-07-03 15:20:41 +10:00
Andrew Bartlett
c983ea8e5d s4-join: Setup correct DNS configuration
This means we do not need to run samba_upgradedns any more.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Jun 24 18:10:10 CEST 2012 on sn-devel-104
2012-06-24 18:10:10 +02:00
Andrew Bartlett
01f52239dc s4-join: Import DNS zones in AD DC join 2012-06-25 00:26:41 +10:00
Andrew Bartlett
f199c5dbc0 s4-classicupgrade: Allow DNS backend to be specified 2012-06-24 23:46:09 +10:00
Jelmer Vernooij
cbd660d013 samdb: Accept a list of member variables rather than a comma-separated string. 2012-06-21 18:05:33 +02:00
Andrew Bartlett
33ff033204 s4-provision: Give better clues on what Samba needs for s3fs ACL support
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Jun 21 14:07:55 CEST 2012 on sn-devel-104
2012-06-21 14:07:55 +02:00
Amitay Isaacs
17ad62b33a samba-tool: gpo: Fix creation of filesystem ACL from directory ACL
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Thu Jun 21 03:25:57 CEST 2012 on sn-devel-104
2012-06-21 03:25:57 +02:00
Andrew Bartlett
352dbddb6d s4-idmap: Add parameter 'idmap_ldb:use rfc2307' and correct implementation errors 2012-06-20 16:22:41 +10:00
Andrew Bartlett
2b50e8c534 s4-provision: Remove --slapd-path option
This just leaves a default enough for the test code to still check the start
of the provision.  This may well be removed in future, and we wish to reduce
the extra options to provision.

Andrew Bartlett
2012-06-20 16:22:41 +10:00
Andrew Bartlett
706a998c1f s4-provision: Remove last unused remenants of the 'sid generator' configuration
This was part of the now-abandoned S4 AD LDAP backend project.

Andrew Bartlett
2012-06-20 16:22:41 +10:00
Andrew Bartlett
d949736f8d s4-classicupgrade: Also ask testparm for 'smb passwd file' 2012-06-16 08:18:10 +02:00
Andrew Bartlett
d9f7195a1f s4-classicupgrade: Use "samba classic" description for samba3 NT4-like domains in samba3upgrade 2012-06-16 08:18:10 +02:00
Andrew Bartlett
39766b75a4 s4-lib/param: FLAG DAY for the default FILE SERVER
This commit changes the default file server to be s3fs.  Existing
installs wishing to keep the ntvfs file server need to set this in
their smb.conf:

server services = +smb -s3fs
dcerpc endpoint services = +winreg +srvsvc

Andrew Bartlett
2012-06-16 08:18:10 +02:00
Andrew Bartlett
b58dc1826e s4-s3upgrade: Assert that administrator has a SID of -500, and only skip root if it is -500
Many upgraded installations have root as -1000, and so that account needs to be kept.

Andrew Bartlett
2012-06-16 08:18:10 +02:00
Andrew Bartlett
61f7f01554 s4-s3upgrade: Add my wins.dat and fix the parsing error
The issue was that the numbers at the end of the lines are space
padded.

Andrew Bartlett
2012-06-16 08:18:10 +02:00
Andrew Bartlett
d0b60f02dd s4-s3upgrade: improve idmap import to use posixAccount and posixGroup entries 2012-06-16 08:18:10 +02:00
Andrew Bartlett
fa223eb26b s4-dbcheck: Always specify the dhcheck control
This will then allow us to make schema modifications, overriding the default ban.

Andrew Bartlett
2012-06-16 03:55:06 +02:00
Andrew Bartlett
67bdf4fa11 lib/param: Use server role = 'standalone server' to be consistant with member server
standalne is left as an alias.

Andrew Bartlett
2012-06-15 09:18:33 +02:00
Andrew Bartlett
b8815dc23d lib/param: Create a seperate server role for "active directory domain controller"
This will allow us to detect from the smb.conf if this is a Samba4 AD
DC which will allow smarter handling of (for example) accidentially
starting smbd rather than samba.

To cope with upgrades from existing Samba4 installs, 'domain
controller' is a synonym of 'active directory domain controller' and
new parameters 'classic primary domain controller' and 'classic backup
domain controller' are added.

Andrew Bartlett
2012-06-15 09:18:33 +02:00
Michael Adam
2a1ab92793 s4:tests: fix use of a non-existent word (existant) 2012-06-12 07:21:45 +02:00
Michael Adam
cec6ebf4c3 s4:provision: fix use of non-existent word (existant) 2012-06-12 07:21:44 +02:00
Kai Blin
f3df2988ba s4 dns: Correctly handle A questions for CNAMEs
When an A/AAAA lookup is made for a name that actually is a CNAME
record, we need to return the CNAME record, and then do the A/AAAA
lookup for the name the CNAME points at.

This still fails for CNAMEs pointing at records for domains we need to
ask our forwarders for.

Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Wed Jun  6 15:23:55 CEST 2012 on sn-devel-104
2012-06-06 15:23:55 +02:00
Kai Blin
754c60e417 s4 dns: Structure tests a bit better 2012-06-06 13:26:14 +02:00
Andrew Bartlett
dc799d4b42 s4-provision: Test for posix ACLs in the actual sysvol path
This avoids issues in the previous location where lp may not be initialised at this point
and instead simply waits until we have a known sysvol path, and test for ACL support
there.

Andrew Bartlett
2012-06-05 04:27:36 +02:00
Andrew Bartlett
d2b635cc2f s4-provision: Place xattr.tdb in the actual state directory
This patch does two things: it fixes up the spelling of "state dir" to
"state directory" so that we actually find the smb.conf parameter, and
we move it to after we process the global settings in case this is
changed in the future.

Andrew Bartlett
2012-06-05 04:27:36 +02:00
Andriy Syrovenko
1a2b65cd31 Add '--use-ntvfs' option to 'samba-tool domain join' 2012-06-05 04:27:36 +02:00
Andrew Bartlett
3e92bff13d s4-provision: Use the s3fs file server by default in migrations
This covers both migrations from s3 and joining a domain as a new DC.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed May 30 14:57:22 CEST 2012 on sn-devel-104
2012-05-30 14:57:22 +02:00
Matthias Dieter Wallnöfer
40e47d08af s4:dbchecker - handle the "none" case correctly
This means that *no* fixing will be done, also the first possible one
will be omitted as well.

Reviewed-by: abartlet

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Tue May 29 21:36:25 CEST 2012 on sn-devel-104
2012-05-29 21:36:25 +02:00
Jelmer Vernooij
bf38a5df5b Avoid all(), as it's not available in Python 2.4.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun May 27 16:13:34 CEST 2012 on sn-devel-104
2012-05-27 16:13:34 +02:00
Alexander Bokovoy
2fc96e6955 s4: samba-tool is usable without export-keytab command, make sure it does not break
When export_keytab is not compiled in (pure client-side Samba 4 build as with
system MIT krb5), export-keytab command of samba-tool will not be available.
Make sure it is not provided but its absence does not break the Python tool.
2012-05-23 17:51:50 +03:00
Lukasz Zalewski
be5bf2c991 When listing group members allow fallback to cn attribute when samAccountName is not available 2012-05-10 14:58:46 +10:00
Andrew Bartlett
0678eb6cdf s4-provision Ensure we have posix ACLs before we permit a s3fs-based Samba4 to be configured 2012-05-08 04:51:59 +02:00
Andrew Bartlett
c2b094ffbc s4-s3-upgrade: Max/min password age policy is in seconds, not days
This cases upgraded domains to have a too-long password expiry, which in extreme
cases can cause the KDC to misfunction.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sun May  6 14:49:39 CEST 2012 on sn-devel-104
2012-05-06 14:49:39 +02:00
Jelmer Vernooij
7ed9ebab83 provision: remove reference to no longer existing template files. 2012-05-03 13:41:24 +02:00
Andrew Bartlett
86b1dd845a s4-samba-tool: make new samba-tool group listmembers use samAccountName
This is the unique username value.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu May  3 01:57:41 CEST 2012 on sn-devel-104
2012-05-03 01:57:41 +02:00
Andrew Bartlett
a0a83802fb s4-s3upgrade: Force ldapsam:trusted = yes
While this setting is not the default in Samba3, any domain that is
in a suitable condition to upgrade to Samba4 should already be in the
layout that ldapsam:trusted uses.  It can be turned off by setting
ldapsam:trusted=false in the smb.conf.

Many upgrades to Samba4 happen on a different host to the old Samba3 domain
and this avoids the need to configure nss_ldap only for the duration of
the upgrade.

Andrew Bartlett
2012-05-03 08:09:09 +10:00
Lukasz Zalewski
9cd664b2e9 Extension to the samba-tool group subcommand functionality to allow listing of the members of an AD group 2012-05-03 08:09:09 +10:00
Andrew Bartlett
d2c8ebe2c7 s4-s3upgrade: Try harder to get group memberships on upgrade
This fixes an issue where some group types were not upgraded, as we
did not upgrade alias memberships.

It also uses enum_group_memberships() to try and find the memberships
from the other direction, by asking which groups a user is a member
of.  As Samba3 (and NT4) does not implement nested groups, this should
be safe.

Andrew Bartlett
2012-05-03 08:09:09 +10:00
Andrew Bartlett
7b55ec290e s4-provision: Fix up --use-s3fs to create the directory for xattr.tdb
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed May  2 04:45:05 CEST 2012 on sn-devel-104
2012-05-02 04:45:03 +02:00
Andrew Bartlett
051042229d s4-provision: set 'dcerpc endpoint servers' but not 'vfs objects'
The VFS objects are now set in the fileserver.conf, but this is only read by smbd, so
the provision-time smb.conf needs to turn off the extra Samba4 DCE/RPC services.

Andrew Bartlett
2012-05-02 10:53:50 +10:00
Andrew Bartlett
0d5d45c2df s4-s3upgrade: print the error message from passdb.error exceptions
This gives more information on why a group membership lookup failed.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Apr 24 04:34:44 CEST 2012 on sn-devel-104
2012-04-24 04:34:44 +02:00
Andrew Bartlett
4ded55ebcd s4-python: Ensure we handle the no-eadb case for system xattrs in get/setntacl
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Apr 19 20:51:16 CEST 2012 on sn-devel-104
2012-04-19 20:51:16 +02:00
Daniele Dario
f1f00e5ba0 Added number of FSMO roles owned by the server we are trying to demote. 2012-04-19 19:15:05 +02:00
Simo Sorce
e21029a270 waf: Fix mispelling
Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Thu Apr 19 17:36:41 CEST 2012 on sn-devel-104
2012-04-19 17:36:41 +02:00
Andrew Bartlett
7ca706de8c dbcheck: Add a check that every FSMO role has a valid owner
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Apr 19 07:49:54 CEST 2012 on sn-devel-104
2012-04-19 07:49:54 +02:00
Andrew Bartlett
6b2753d71e s4-samba-tool: Fix samba-tool fsmo seize
This is currently untested, and a restructure broke it.

Andrew Bartlett
2012-04-19 14:19:09 +10:00
Andrew Bartlett
a2b7a9e2a2 s4-s3upgrade: Do not ever set a domain-wide maxPwdAge of 0
This means no-expiry in s3, and so we must treat it like -1.

Andrew Bartlett
2012-04-19 14:19:09 +10:00
Andrew Bartlett
a5905bfb39 s4-s3upgrade: Ignore (with warning) groups that are listed but we cannot list members for 2012-04-19 09:59:40 +10:00
Andrew Tridgell
c69c07efec dbcheck: added fix for incorrect RMD_FLAGS
this fixes the case where a DN link has RMD_FLAGS=0 for a link inside
a deleted object

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Apr 18 09:19:41 CEST 2012 on sn-devel-104
2012-04-18 09:19:41 +02:00
Matthias Dieter Wallnöfer
8c9c6f869d s4:dbchecker.py - integrate the "objectClass" fixing code
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2012-04-18 07:48:05 +02:00
Andrew Bartlett
538893d183 s3fs: Use xattr_tdb format for xattr storage
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Apr 18 05:39:01 CEST 2012 on sn-devel-104
2012-04-18 05:39:01 +02:00
Andrew Bartlett
628a24172f s4-python: Add python wrapper for xattr_tdb format xattr storage
This uses the format used by the vfs_xattr_tdb module.  The s4
posix:eadb format is kept, just in a new file and module.

Andrew Bartlett
2012-04-18 12:05:00 +10:00
Stefan Metzmacher
4460ba5288 s4:ldapcmp.py: pass down outf and errf
Not all classes are derived from class 'Command'.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Apr 17 10:06:47 CEST 2012 on sn-devel-104
2012-04-17 10:06:47 +02:00
Matthieu Patou
f35d20119a Add an option to have s3fs as file server for samba4
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Apr 16 09:38:18 CEST 2012 on sn-devel-104
2012-04-16 09:38:17 +02:00
Amitay Isaacs
06a0101082 s4-provision: Update configuration lines for dlz_bind9
This adds configuration lines for BIND versions 9.8.x and 9.9.x.

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Mon Apr 16 03:52:14 CEST 2012 on sn-devel-104
2012-04-16 03:52:14 +02:00
Alexander Bokovoy
bcc16f1911 s4-libnet: split export_keytab in a separate python module to avoid pulling in HDB dependency
Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Thu Apr 12 15:23:19 CEST 2012 on sn-devel-104
2012-04-12 15:23:19 +02:00
Matthias Dieter Wallnöfer
438971e214 LDB/s4 - do not use the "(dn=...)" syntax on filters anymore
Make it AD-compatible using "(distinguishedName=...)".

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-03-26 00:57:29 +02:00
Björn Baumbach
217d04138b s4-samba-tool: add password verification in change user pass
Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Mar 21 17:43:35 CET 2012 on sn-devel-104
2012-03-21 17:43:35 +01:00
Björn Baumbach
5b4d5bee44 s4-samba-tool: add password verification in add user
Signed-off-by: Michael Adam <obnox@samba.org>
2012-03-21 16:11:25 +01:00
Michael Adam
ee0e1ca5d8 s4:selftest: add test for "samba-tool group list"
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Mar 19 02:30:39 CET 2012 on sn-devel-104
2012-03-19 02:30:39 +01:00
Michael Adam
704f0683f0 s4:samba-tool: add simple command "group list" 2012-03-18 23:41:40 +01:00
Michael Adam
f4458a5cef s4:selftest: add a new testsuite for the "samba-tool group" command 2012-03-18 23:41:40 +01:00
Matthieu Patou
31cab612fc Factorize code from findprovisionusnranges in order to solve bug #8504 2012-03-17 00:18:39 -07:00
Michael Adam
15eaaa095f s4:samba-tool: remove remains of patch conflict resolution
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Mar 16 19:13:32 CET 2012 on sn-devel-104
2012-03-16 19:13:32 +01:00
Jelmer Vernooij
3530ac0149 samba.tests.source: Verify that only executable python files (and only executable files) have a shebang line. 2012-03-15 16:03:36 +01:00
Michael Adam
edfdbb82bb s4:selftest: remove python shebang accidentially re-added to the "samba-tool user" test
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Mar 15 16:17:54 CET 2012 on sn-devel-104
2012-03-15 16:17:54 +01:00
Michael Adam
d430c88cfe s4:selftest: fix message typo in test for "samba-tool user list"
Spotted by kukks - thanks.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Mar 15 14:24:29 CET 2012 on sn-devel-104
2012-03-15 14:24:29 +01:00
Michael Adam
94af1581ef s4:selftest: fix a message-typo in the "samba-tool user" testsuite.
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Mar 14 21:19:11 CET 2012 on sn-devel-104
2012-03-14 21:19:11 +01:00
Michael Adam
a85d86129a s4:selftest: add a new test for "samba-tool user list" 2012-03-14 19:39:18 +01:00
Andreas Schneider
8458043457 s4-python: Add missing python source file encoding.
See http://www.python.org/dev/peps/pep-0263/

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Tue Mar 13 19:31:09 CET 2012 on sn-devel-104
2012-03-13 19:31:09 +01:00
Andreas Schneider
4faba7615a s4-python: Remove env from non-executable webserver script. 2012-03-13 17:52:30 +01:00
Andreas Schneider
e5425743c2 s4-python: Remove env from non-executable samba_tool scripts. 2012-03-13 17:52:30 +01:00
Andreas Schneider
f9fda92376 s4-python: Remove env from non-executable dcerpc scripts. 2012-03-13 17:52:30 +01:00
Andreas Schneider
070828f791 s4-python: Remove execute flag from non-executable rpc_talloc script. 2012-03-13 17:52:30 +01:00
Andreas Schneider
ab1e52e09d s4-python: Remove env from non-executable blackbox test scripts. 2012-03-13 17:52:30 +01:00
Andreas Schneider
3caf954b85 s4-python: Remove execute flag from ndrdump blackbox script. 2012-03-13 17:52:29 +01:00
Andreas Schneider
cae282b5c2 s4-python: Remove env from non-executable test scripts. 2012-03-13 17:52:29 +01:00
Andreas Schneider
82c2bca89b s4-python: Remove env from non-executable netcmd scripts. 2012-03-13 17:52:29 +01:00
Andreas Schneider
3c9238e1b9 s4-python: Remove execute flag from netcmd scripts. 2012-03-13 17:52:29 +01:00
Andreas Schneider
b787ba789e s4-python: Remove env from non-executable samba scripts. 2012-03-13 17:52:29 +01:00
Andreas Schneider
66f16d57dc s4-python: Remove execute flag of upgradehelpers.py. 2012-03-13 17:52:29 +01:00