1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

1287 Commits

Author SHA1 Message Date
Volker Lendecke
6b7e509004 If there are no alias members, don't ask for their sids :-)
Volker
(This used to be commit 99f03a641e4fd75c3bafb8bd153687743317a3dc)
2004-02-17 10:08:18 +00:00
Volker Lendecke
f570f879bb Fix success message for net groupmap modify
Volker
(This used to be commit 19b30334a7c0f6abde6dfc81550e50aa823117c2)
2004-02-16 14:04:56 +00:00
Jelmer Vernooij
91cc4a1900 Fix ETA Calculation when resuming
(This used to be commit a5f09f0991e5a5bd9538211b0d430020052670c8)
2004-02-13 22:09:53 +00:00
Gerald Carter
da52004988 fix set/getsampwent iterator in tdbsam to use an allocated list
(This used to be commit 8734d91cd7681219f1389e3c41979028eadbb7fe)
2004-02-11 21:10:04 +00:00
Gerald Carter
439bcaf9e7 BUG 1055; patch from SATOH Fumiyasu <fumiya@miraclelinux.com>; formatting fixes for 'net share'
(This used to be commit 44db163b3001d8dc50b64bac7fd12be1147e14b7)
2004-02-11 14:59:08 +00:00
Volker Lendecke
6268f1bdbc Expand 'net rpc group members' to local groups.
Volker
(This used to be commit 90fabe6ec004ab95739100b6cd5b7cbd87e67e24)
2004-02-09 18:19:25 +00:00
Andrew Bartlett
784c631a3a Make it possible to 'net rpc samdump' of any domain you are currently joined
to, despite any smb.conf settings.

Work to allow the same for 'net rpc vampire', but instead give a clear
error message on what is incorrect.

Andrew Bartlett
(This used to be commit 6b629344c5a4061d6052fa91f8429b337bab95fb)
2004-02-08 10:59:09 +00:00
Andrew Bartlett
62df6251cc Add some help for 'net rpc password'.
Andrew Bartlett
(This used to be commit 4c7d6b9be393f1f5697afe0671f15651ac6282f3)
2004-02-08 09:25:58 +00:00
Andrew Bartlett
d198c55877 Make more functions static, and remove duplication in the use of functions
in lib/smbpasswd.c that were exact duplicates of functions in passdb/passdb.c

(These should perhaps be pulled back out to smbpasswd.c, but that can occour
later).

Andrew Bartlett
(This used to be commit fcdc5efb1e245c8fa95cd031f67ec56093b9056e)
2004-02-08 08:38:42 +00:00
Andrew Bartlett
e0acf3780a Make this table static const.
Andrew Bartlett
(This used to be commit 0686bc9e076c722e33dd9b236cf7c33d448c3b34)
2004-02-08 01:02:12 +00:00
Andrew Bartlett
7acbbe9ba0 I should have done this years ago...
This adds the very simple 'admin set password' capability to 'net rpc',
much as we have it for 'net ads'.

Andrew Bartlett
(This used to be commit ced7fb55276f3d21d69b85b40d3f64c5e790bcc9)
2004-02-07 03:54:39 +00:00
Andrew Bartlett
ccaf0e7fb1 This should be the correct fix for the lack of a prototype for
remote_password_change().

Sorry for the original bug.

Andrew Bartlett
(This used to be commit 955436a6f6d7c2f580b2c4e1edbb7ee2fe5df858)
2004-02-04 11:12:25 +00:00
Gerald Carter
7ca6d16605 fix problems with proto.h
(This used to be commit 5a32f9568f128374df98491b43e6f5b299cb656c)
2004-02-02 20:16:24 +00:00
Gerald Carter
19cc1a9f20 remerge andrew's cracklib patch from HEAD and fix a compile warnings
(This used to be commit b60f6ec30d05e4e5bba9934a416ddc8bc089824f)
2004-02-02 00:08:35 +00:00
Gerald Carter
d4420dc902 more initialization fixes
(This used to be commit 9e590d603547ef1e8388bea66eb5d44e4dfd6412)
2004-01-29 22:16:58 +00:00
Andrew Bartlett
784b05c489 This adds client-side support for the unicode/SAMR password change scheme.
As well as avoiding DOS charset issues, this scheme returns useful error
codes, that we can map back via the pam interface.

This patch also cleans up the interfaces used for password buffers, to
avoid duplication of code.

Andrew Bartlett
(This used to be commit 2a2b1f0c872d154fbcce71a250e23dfad085ba1e)
2004-01-26 08:45:02 +00:00
Volker Lendecke
f9e9acb07f Fix compiler warning
(This used to be commit 413ed77142377351a0ed1c6cf800a14809e56e9c)
2004-01-21 14:48:02 +00:00
Volker Lendecke
28cc456e08 Display some nicer error messages for login via 'net'. I don't
see a reason why we have so many special cases and not simply use
nt_errstr(nt_status).

Comments?

Volker
(This used to be commit ea1a5fb30357f4fe70139ff5583d09cef9fdaa62)
2004-01-21 14:36:56 +00:00
Jim McDonough
261fba09ef Fix another join problem. Don't use a TALLOC_CTX before it has been
initialized.

Also split out the oldstyle join into a new fn, allowing us to call it
with no failure message from net rpc join, but displaying a failure message
when used with net rpc oldjoin.
(This used to be commit 07d6ed4343d7a2575dc974bfbc498b14784b2dc1)
2004-01-16 15:07:28 +00:00
Jim McDonough
8083486dee Fix net rpc join (at least newstyle) after it was broken by changing
the parms to cli_lsa_query_info_policy without changing them here...
(This used to be commit a885df7635a9230bc6cca88e7e8fb1420c74c7fb)
2004-01-15 19:45:36 +00:00
Gerald Carter
31a3842644 fixing compile problems due to my recent ads.h changes
(This used to be commit d7b6298b9e4e7f83deaa2c6f3d711c390ff9cefd)
2004-01-12 14:26:50 +00:00
Andrew Bartlett
7d068355aa This merges in my 'always use ADS' patch. Tested on a mix of NT and ADS
domains, this patch ensures that we always use the ADS backend when
security=ADS, and the remote server is capable.

The routines used for this behaviour have been upgraded to modern Samba
codeing standards.

This is a change in behaviour for mixed mode domains, and if the trusted
domain cannot be reached with our current krb5.conf file, we will show
that domain as disconnected.

This is in line with existing behaviour for native mode domains, and for
our primary domain.

As a consequence of testing this patch, I found that our kerberos error
handling was well below par - we would often throw away useful error
values.  These changes move more routines to ADS_STATUS to return
kerberos errors.

Also found when valgrinding the setup, fix a few memory leaks.

While sniffing the resultant connections, I noticed we would query our
list of trusted domains twice - so I have reworked some of the code to
avoid that.

Andrew Bartlett
(This used to be commit 7c34de8096b86d2869e7177420fe129bd0c7541d)
2004-01-08 08:19:18 +00:00
Jelmer Vernooij
950a6d980a Add smbget utility, a simple wget-like utility that uses libsmbclient.
Supports recursive downloads and resume, progress indication and shows
estimated time remaining.
(This used to be commit 82bd1b45a4205706b57bae42c7b03974f8b44753)
2004-01-07 00:43:52 +00:00
Jelmer Vernooij
bd4304476b Fix -s option to smbcontrol (#908)
(This used to be commit 7495395c1cc3b09b27d6eeb7dff6f214701d03d6)
2004-01-06 20:01:48 +00:00
Jeremy Allison
0d44747df9 Patch based on work from James Peach <jpeach@sgi.com> to convert over to
using pread/pwrite. Modified a little to ensure fsp->pos is correct.
Fix for #889.
Jeremy.
(This used to be commit 019aaaf0df091c3f67048f591e70d4353a02bb9b)
2004-01-06 01:22:14 +00:00
Andrew Bartlett
b4593e92ff JHT came up with a nasty (broken) torture case in preparing examples for
his book.

This prompted me to look at the code that reads the unix group list.  This
code did a lot of name -> uid -> name -> sid translations, which caused
problems.  Instead, we now do just name->sid

I also cleaned up some interfaces, and client tools.

Andrew Bartlett
(This used to be commit f9e59f8bc06fae7e5c8cb0980947f78942dc25c0)
2004-01-02 05:32:07 +00:00
Andrew Bartlett
bcd0e51e28 Get the DOMAIN\username around the right way (I had username\domain...)
Push the unix username into utf8 for it's trip across the socket.

Andrew Bartlett
(This used to be commit 3225f262b18bdcf326d3bfd031dac169bd9347c9)
2003-12-30 22:27:33 +00:00
Andrew Bartlett
829188b34f Try to gain a bit more consistancy in the output of usernames from ntlm_auth:
Instead of returning a name in DOMAIN\user format, we now return it in the
same way that nsswtich does - following the rules of 'winbind use default
domain', in the correct case and with the correct seperator.

This should help sites who are using Squid or the new SASL code I'm working
on, to match back to their unix usernames.

Andrew Bartlett
(This used to be commit 7a3a5a63612b2698a39f784859496c395505a79b)
2003-12-30 13:20:39 +00:00
Andrew Bartlett
43772e1d4a Make the name of the NTLMSSP client more consistant before we lock it in stone.
(This used to be commit 0fa268863b7352343eb7f211181a02f60848bd0c)
2003-12-30 08:52:46 +00:00
Andrew Bartlett
ca1b7e353d Remove testing hack
(This used to be commit 96f3beb462a6d4a489e894c1f05c528107135b3a)
2003-12-30 07:38:32 +00:00
Andrew Bartlett
adc07646a3 Move our basic password checking code from inside the authentication
subsystem into a seperate file - ntlm_check.c.

This allows us to call these routines from ntlm_auth.  The purpose of this
exercise is to allow ntlm_auth (when operating as an NTLMSSP server) to
avoid talking to winbind.  This should allow for easier debugging.

ntlm_auth itself has been reorgainised, so as to share more code between
the SPNEGO-wrapped and 'raw' NTLMSSP modes.  A new 'client' NTLMSSP mode
has been added, for use with a Cyrus-SASL module I am writing (based on vl's
work)

Andrew Bartlett
(This used to be commit 48315e8fd227978e0161be293ad4411b45e3ea5b)
2003-12-30 07:33:58 +00:00
Andrew Bartlett
bccf3f374b Refactor our authentication and authentication testing code.
The next move will be to remove our password checking code from the SAM
authentication backend, and into a file where other parts of samba can use
it.

The ntlm_auth changes provide for better use of common code.

Andrew Bartlett
(This used to be commit 2375abfa0077a884248c84614d5109f57dfdf5b1)
2003-12-30 05:02:32 +00:00
Volker Lendecke
8bfc33f5ed Collecting some minor patches...
This adds the ability to specify the new user password for 'net ads password'
on the command line. As this needs the admin password on the command line, the
information leak is minimally more.

Patch from gd@suse.de

Volker
(This used to be commit e6b4b956f68bfea69b2de3608b4c829250d24a7a)
2003-12-26 19:38:36 +00:00
Andrew Bartlett
2e9deb12bf Thanks to Serassio Guido for noticing issues in our Squid NTLMSSP
implementation.  We were not resetting the NTLMSSP state for new
negotiate packets.

Andrew Bartlett
(This used to be commit e0a026c9b561893e5534923b18ca748e6177090e)
2003-12-24 09:56:51 +00:00
Volker Lendecke
748b268a4f In the brief 'net rpc group' listing, don't cut off group names at 21 chars.
Volker
(This used to be commit 5d0b8280f6c4990ee3a26c310efebfa859ee21be)
2003-12-01 14:12:26 +00:00
Volker Lendecke
d9bf130c51 Beautify the net status help message a bit
Volker
(This used to be commit e9391e206a8cdbcc08597a33b557b86f9a5d73ce)
2003-12-01 14:07:22 +00:00
Volker Lendecke
000b39a682 I needed a decently parseable format of smbstatus. Looking at smbstatus code
tells me that this should not be expanded, so I implemented

net status [sessions|shares] [parseable]

Volker
(This used to be commit 63d877c6b4786dcddf5f389842f798857be282c0)
2003-12-01 13:58:43 +00:00
Volker Lendecke
3dda7cf2ca Implement 'net rpc group list [global|local|builtin]*' for a select listing of
the respective user databases.

Volker
(This used to be commit 39e4ee0c5be9f8d5a26b03ae17865b8e576b0b62)
2003-11-28 15:10:00 +00:00
Jeremy Allison
521104359e Fix for pdbedit error code returns (sorry, forgot who sent in the patch).
Jeremy.
(This used to be commit 685097bc50a8ef387c5082401858d482329c37bc)
2003-11-27 18:34:42 +00:00
Volker Lendecke
dd51a9be94 Only ask for 512 names at a time.
Volker
(This used to be commit d5775b7106dc5d6326db89f7369d2ffd61646426)
2003-11-27 17:31:18 +00:00
Volker Lendecke
5efc777a0f Implement "net rpc group members": Get members of a domain group in
human-readable format.

Volker
(This used to be commit 4e3a2eb8e04c3a669d94e38d81e994606fa6ef9d)
2003-11-26 10:07:07 +00:00
Volker Lendecke
203710ea6d Get rid of a const warning
Volker
(This used to be commit 94860687c535ace0c962ca3fe7da59df05325c62)
2003-11-26 09:58:41 +00:00
Andrew Bartlett
78404434d0 Add support for variable-length session keys in our client code.
This means that we now support 'net rpc join' with KRB5 (des based)
logins.  Now, you need to hack 'net' to do that, but the principal is
important...

When we add kerberos to 'net rpc', it should be possible to still do
user management and the like over RPC.

(server-side support to follow shortly)

Andrew Bartlett
(This used to be commit 9ecf9408d98639186b283f1acf0fac46417547d0)
2003-11-22 23:38:41 +00:00
Andrew Bartlett
fcbfc7ad06 Changes all over the shop, but all towards:
- NTLM2 support in the server
 - KEY_EXCH support in the server
 - variable length session keys.

In detail:

 - NTLM2 is an extension of NTLMv1, that is compatible with existing
domain controllers (unlike NTLMv2, which requires a DC upgrade).

 * This is known as 'NTLMv2 session security' *

(This is not yet implemented on the RPC pipes however, so there may
well still be issues for PDC setups, particuarly around password
changes.  We do not fully understand the sign/seal implications of
NTLM2 on RPC pipes.)

This requires modifications to our authentication subsystem, as we
must handle the 'challege' input into the challenge-response algorithm
being changed.  This also needs to be turned off for
'security=server', which does not support this.

- KEY_EXCH is another 'security' mechanism, whereby the session key
actually used by the server is sent by the client, rather than being
the shared-secret directly or indirectly.

- As both these methods change the session key, the auth subsystem
needed to be changed, to 'override' session keys provided by the
backend.

- There has also been a major overhaul of the NTLMSSP subsystem, to merge the 'client' and 'server' functions, so they both operate on a single structure.  This should help the SPNEGO implementation.

- The 'names blob' in NTLMSSP is always in unicode - never in ascii.
Don't make an ascii version ever.

- The other big change is to allow variable length session keys.  We
have always assumed that session keys are 16 bytes long - and padded
to this length if shorter.  However, Kerberos session keys are 8 bytes
long, when the krb5 login uses DES.

 * This fix allows SMB signging on machines not yet running MIT KRB5 1.3.1. *

- Add better DEBUG() messages to ntlm_auth, warning administrators of
misconfigurations that prevent access to the privileged pipe.  This
should help reduce some of the 'it just doesn't work' issues.

- Fix data_blob_talloc() to behave the same way data_blob() does when
passed a NULL data pointer.  (just allocate)


REMEMBER to make clean after this commit - I have changed plenty of data structures...
(This used to be commit f3bbc87b0dac63426cda6fac7a295d3aad810ecc)
2003-11-22 13:19:38 +00:00
Gerald Carter
c3c1e248ad show locked files for -u <user>; bug 590
(This used to be commit d72d77c42741714f2e32d0e24e706929242f1c62)
2003-11-12 22:35:50 +00:00
Tim Potter
9f154119e8 Final round of printf warnings fixes for the moment.
(This used to be commit 0519a7022b4979c0e8ddd4907f4b858a59299c06)
2003-11-06 22:11:08 +00:00
Jim McDonough
debbecb23c Add shutdown abort try over initshutdown pipe first, then fall back to
winreg pipe if it doesn't work.  Fixes bug #534.

I will go back and add the same logic for the shutdown itself, even though
that works so far against win2k (haven't tested all win clients).
(This used to be commit e660b04e8f2446bb8a6590e9afcb5ab49f90a701)
2003-10-24 14:03:18 +00:00
Jim McDonough
c3125b6e2f Fix bug 451. Stop net -P from prompting for machine account password.
Based on work by Ken Cross (kcross@nssolutions.com).
(This used to be commit 8ef7ac22ef1a60dca0a2d01dc6ff4ba14bc1549a)
2003-10-23 14:33:19 +00:00
Jeremy Allison
bb0598faf5 Put strcasecmp/strncasecmp on the banned list (except for needed calls
in iconv.c and nsswitch/). Using them means you're not thinking about multibyte at
all and I really want to discourage that.
Jeremy.
(This used to be commit d7e35dfb9283d560d0ed2ab231f36ed92767dace)
2003-10-22 23:38:20 +00:00
John Terpstra
8a0706668d Changed output so all debug output goes to stderr, and all file processing
goes to stdout.

Note: This change permits use of testparm processing of smb.conf to be
redirected into a file that can be used as an smb.conf file. ie: All
information that should not be in smb.conf will be on stderr, all pertinent
smb.conf info will go to stdout.

Example of use:
	A fully documented smb.conf.master file can be maintained.
	To create smb.conf do:
		testparm -s > smb.conf
(This used to be commit 0450dc97731d95c7cd3b2c8a54721991fd6165df)
2003-10-20 04:51:40 +00:00