1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

58 Commits

Author SHA1 Message Date
Volker Lendecke
044c6f513d Implement NETLOGON GetDCName client side. You can ask a DC for the name of
a DC it trusts.

Volker
(This used to be commit ae6840320f)
2004-04-02 12:56:18 +00:00
Andrew Bartlett
f0cd6b35e5 - Fix the kerberos downgrade problem:
- When connecting to the NETOGON pipe, we make a call to auth2, in order
   to verify our identity.  This call was being made with negotiation flags
   of 0x1ff.  This caused our account to be downgraded.  If we instead make
   the call with flags > 1ff (such as 0x701ff), then this does not occour.

 - This is *not* related to the use of kerberos for the CIFS-level connection

My theory is that Win2k has a test to see if we are sending *exactly* what
NT4 sent - setting any other flags seems to cause us to remain intact.

Also ensure that we only have 'setup schannel' code in a few places, not
scattered around cmd_netlogon too.

Andrew Bartlett
(This used to be commit e10f0529fe)
2003-08-19 20:39:32 +00:00
Andrew Bartlett
172766eea7 Change Samba to always use extended security for it's guest logins, (ie,
NTLMSSP with "" username, NULL password), and add --machine-pass (-P) to
all of Samba's clients.

When connecting to an Active Directory DC, you must initiate the CIFS level
session setup with Kerberos, not a guest login.  If you don't, your machine
account is demoted to NT4.

Andrew Bartlett
(This used to be commit 3547cb3def)
2003-08-14 01:08:00 +00:00
Volker Lendecke
d1da999e0a This puts real netlogon connection caching to winbind. This becomes
important once we start doing schannel, as there would be a lot more
roundtrips for the second PIPE open and bind. With this patch logging
in to a member server is a matter of two (three if you count the
ack...) packets between us and the DC.

Volker
(This used to be commit 5b3cb7725a)
2003-05-08 08:02:52 +00:00
Andrew Bartlett
f071020f5e Merge from HEAD - save the type of channel used to contact the DC.
This allows us to join as a BDC, without appearing on the network as one
until we have the database replicated, and the admin changes the configuration.

This also change the SID retreval order from secrets.tdb, so we no longer
require a 'net rpc getsid' - the sid fetch during the domain join is sufficient.
Also minor fixes to 'net'.

Andrew Bartlett
(This used to be commit 876e00fd11)
2003-04-21 14:09:03 +00:00
Tim Potter
c182b78639 Merge: remove unused variable.
(This used to be commit 6a1d99d318)
2003-04-14 05:26:30 +00:00
Volker Lendecke
7238bf5f40 This is the netlogon schannel client code. Try a
rpcclient -S pdc -U% -c "samlogon user password"

and it should work with the schannel. Needs testing against platforms
different from NT4SP6.

Volker
(This used to be commit eaef0d8aef)
2003-04-09 15:54:17 +00:00
Tim Potter
417bf608f4 Merge of waider's rpcclient return type patch.
(This used to be commit fb91bfa7a2)
2003-03-18 06:30:30 +00:00
Tim Potter
1788f806e7 Merge: const fixes.
(This used to be commit a20aba0999)
2003-02-25 23:51:56 +00:00
Gerald Carter
36ef82a529 merge of new client side support the Win2k LSARPC UUID in rpcbind
from APP_HEAD
(This used to be commit 1cfd2ee433)
2002-10-04 04:10:23 +00:00
Gerald Carter
a834a73e34 sync'ing up for 3.0alpha20 release
(This used to be commit 65e7b5273b)
2002-09-25 15:19:00 +00:00
Jelmer Vernooij
64c53e819b sync 3.0 branch with HEAD
(This used to be commit 6497eb78e8)
2002-08-17 15:33:49 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb)
2002-07-15 10:35:28 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Jean-François Micouleau
9f59fc64b8 update the ldap support code. it compiles.
Ignacio you can update your howto ;-)

samsync: a small patch to try chaning challenges.

	J.F.
(This used to be commit c99bc30559)
2001-12-13 18:09:29 +00:00
Tim Potter
35e44b3a83 Allow the logon level to be passed to cli_netlogon_sam_logon() rather than
the validation level.
(This used to be commit c79e94ea27)
2001-10-30 05:41:07 +00:00
Tim Potter
5c3ccf7766 Added samlogon command to test against win2k native mode server. I think
there's a bug in the marshalling of net_sam_logon.
(This used to be commit 7c5ac46b8a)
2001-10-30 01:49:44 +00:00
Tim Potter
439c7e0ca2 Some old stuff hanging around since the CIFS conference. Big cleanup of
rpcclient code.  Refactored cmd_* functions to move common mem_ctx and pipe
opening stuff up one level.  Moved rpcclient.h into rpcclient directory and
out of includes/smb.h
(This used to be commit a40facba96)
2001-10-12 05:56:23 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Tim Potter
15a6649c01 Converted cli_net_auth2() and cli_nt_setup_creds() to return NTSTATUS.
(This used to be commit e0bdcbc599)
2001-09-18 02:49:35 +00:00
Andrew Tridgell
c76dd14040 it now all compiles - so try enabling it by default and see what explodes on the build farm
(This used to be commit 5bb7e4f0f6)
2001-09-04 10:57:29 +00:00
Tim Potter
d5c9172ada Merge of sam sync code from TNG.
Reverse-engineered the sam replication protocol from staring at hex dumps
for a while.  It's pretty similar to the sam sync protocol with a couple of
different delta header types.

I wasn't able to figure out the format of the privilege stuff - needs more
time and a whiteboard.  (-:

The impressive bit is that the sam sync stuff from tng basically just
worked thanks mainly to Luke Leighton's efforts in this area.
(This used to be commit 3a60cb44f2)
2001-08-28 06:43:43 +00:00
Andrew Tridgell
b031af348c converted another bunch of stuff to NTSTATUS
(This used to be commit 1d36250e33)
2001-08-27 19:46:22 +00:00
Tim Potter
8db78af970 Started adding some help/usage info for rpcclient commands.
(This used to be commit 37052a1bcc)
2001-07-20 04:38:58 +00:00
Simo Sorce
6ad1fcc279 fix compiler warnings
(This used to be commit 1959864490)
2001-06-23 14:58:38 +00:00
Tim Potter
43bc613e74 Added srvinfo and partial logonctrl and logonctrl2 commands.
(This used to be commit c93718daa1)
2001-05-24 08:10:50 +00:00
Tim Potter
40ff4007c7 Added stubs for SRVSVC and NETLOGON rpcclient commands.
(This used to be commit 3343c9f0d6)
2001-05-24 00:20:32 +00:00
Gerald Carter
3396a1d978 just enough to get rpcclient to compile. Look for #if 0
blocks around a few unimplemented functions.  Also had to
add cli_reg.c to Makefile.in


--jerry
(This used to be commit 426c43fb51)
2000-06-23 00:09:21 +00:00
Andrew Tridgell
da44845a09 moved secrets fns into secrets.c
(This used to be commit f890bcf067)
2000-06-03 06:22:19 +00:00
Andrew Tridgell
2958dfcdf8 added secrets.tdb and changed storage of trust account password to use
it
(This used to be commit 88ad00b82a)
2000-05-08 10:42:21 +00:00
Andrew Tridgell
00e3fe1324 moved trans2.h and nterr.h into includes.h with all our other includes
(This used to be commit d7cd7c88fd)
2000-04-25 14:06:57 +00:00
Andrew Tridgell
3db52feb1f first pass at updating head branch to be to be the same as the SAMBA_2_0 branch
(This used to be commit 453a822a76)
1999-12-13 13:27:58 +00:00
Luke Leighton
4ab9d91428 ABOUT TIME!!!!!!!!
damn, this one is bad.

started, at least two days ago, to add an authentication mechanism to
the smbd<->msrpc redirector/relay, such that sufficient unix / nt
information could be transferred across the unix socket to do a
become_user() on the other side of the socket.

it is necessary that the msrpc daemon inherit the same unix and nt
credentials as the smbd process from which it was spawned, until
such time as the msrpc daemon receives an authentication request
of its own, whereupon the msrpc daemon is responsible for authenticating
the new credentials and doing yet another become_user() etc sequence.
(This used to be commit 30c7fdd6ef)
1999-12-08 21:43:03 +00:00
Luke Leighton
98e28ee14c cleaning up: removing those horrible references to server list
functions (cli_net_use_addlist()).  needed originally because
there was no get_dc_any_name() function.
(This used to be commit 3a2b920ea2)
1999-12-02 19:03:23 +00:00
Luke Leighton
f6c5f75568 damn, that took a while. nt login password was being stored incorrectly
in private .mac file (oops).  ntlogin test now works.
(This used to be commit c98c666906)
1999-12-01 20:18:21 +00:00
Luke Leighton
106fe88be0 1) when no domain used in ntlogin test command, should use default one
from previous lsaquery command.  over-ridden from DOMAIN\username

2) initialisation of cli_state is a little more specific: sets use_ntlmv2
   to Auto.  this can always be over-ridden.

3) fixed reusage of ntlmssp_cli_flgs which was being a pain

4) added pwd_compare() function then fixed bug in cli_use where NULL
   domain name was making connections multiply unfruitfully

5) type-casting of mallocs and Reallocs that cause ansi-c compilers to bitch
(This used to be commit 301a6efaf6)
1999-12-01 16:39:51 +00:00
Luke Leighton
0d44ff9a76 attempting to resolve the issue that multiple servers often specified in
parameters to connect to \PIPE\NETLOGON.
(This used to be commit d1986ade30)
1999-11-29 21:47:14 +00:00
Luke Leighton
44334ace98 ok. got ntlogin command working. argh, it maintains a connection to
the remote machine, because i don't know what to _do_ with it!!!!

argh!!!
(This used to be commit 85cc680736)
1999-11-29 21:16:12 +00:00
Luke Leighton
e302cb2b18 first attempt at getting \PIPE\NETLOGON working. it's pretty horrible.
(This used to be commit 44dd3efa63)
1999-11-29 19:46:57 +00:00
Luke Leighton
2803a72751 ok. *whew*. this is the first completed part of the restructure.
verified that lsaquery, lsalookupsids work, and found some bugs in the
parameters of these commands :-)

soo... we now have an lsa_* api that has the same arguments as the nt
Lsa* api!  cool!

the only significant coding difference is the introduction of a
user_credentials structure, containing user, domain, pass and ntlmssp
flags.
(This used to be commit 57bff6fe82)
1999-11-24 22:45:09 +00:00
Luke Leighton
1ed8653112 another four next_token() removals (using getopt instead)
(This used to be commit 3e76ca9b17)
1999-11-22 19:46:26 +00:00
Luke Leighton
aa12f3e0e9 okay :) all cmd_() functions now take int argc, char **argv :) that
means that some commands need more work, as they still use next_token(),
the use of which i wish to avoid.

plus, i was getting fed up of the poor command-line processing in some
of these commands.  i'm starting to need getopt() in them, especially
in samsetuser.

WARNING: only cmd_samr has been modded to use getopt() so far!  reg
commands won't work, esp.
(This used to be commit 9a1efa03c8)
1999-11-22 19:02:39 +00:00
Luke Leighton
ea6592046f adding extra parameter back in to trust account functions (trust account name).
restoring opening S-1-5-20 in sam enum users code.
(This used to be commit 1be877114e)
1999-10-26 16:46:45 +00:00
Luke Leighton
45b794bdde the dynamic memory alloc blood-fest goes on...
(This used to be commit 134b20e2a7)
1999-10-21 19:02:57 +00:00
Luke Leighton
6f9105c853 various. debug levels changed. nmbd doesn't need libsmb/clienttrust.c.
samr_lookup_rids() moved to a dynamic memory structure not a
static one limited to 32 RIDs.  cli_pipe.c reading wasn't checking
ERRmoredata when DOS error codes negotiated (this terminates
MSRPC code with prejudice).
(This used to be commit 8976eca2db)
1999-10-21 16:53:50 +00:00
Luke Leighton
87d92a1f11 need status codes from cli_net_req_chal() and cli_net_auth2().
this format is what i would like _all_ these functions to be
(returning status codes, not BOOL) but that's a horrendous
amount of work at the moment :)
(This used to be commit 02f2406042)
1999-10-19 19:55:43 +00:00
Luke Leighton
f1c2fdb270 split matthew's sync command (only currently called from smbpasswd)
into a separate module
(This used to be commit d99eca020a)
1999-09-21 21:28:27 +00:00
Luke Leighton
6a5a4e8186 BDC support.
(This used to be commit 2331aa32ab)
1999-07-21 00:32:09 +00:00
Matthew Chapman
99e42c0656 Some more BDC-related fixes, mainly to the NET_SAM_SYNC RPC with respect
to alignment, missing fields, etc. - it should now work correctly.
There is still the problem of decoding the private data field.
(This used to be commit c3c25e762f)
1999-06-02 03:19:20 +00:00
Matthew Chapman
373ea639e0 Mainly BDC-related changes.
* Added SEC_CHAN_BDC
* Propagate sec_chan into the various functions which change trust account
  passwords, so they can be used for domain control and inter-domain
  trusts.
* Fix for endianness problem reported by Edan Idzerda <edan@mtu.edu>. A
  BUFFER2 is really a "unibuf" in my terminology and we should treat it as
  such.
* Added some more common NT structures (BIGINT, BUFHDR2, BUFFER4).
* Added NET_SAM_SYNC (-> NetDatabaseSync2) RPC for account replication.
  Still experimental and incomplete, with a few too many NULL security
  descriptors lying around (must go look at Jeremy's SD code). Haven't
  worked out password encryption yet either.
  However, the XXX_INFO structures I've added to rpc_netlogon.h are quite
  nice as they give some insight into how these objects are stored in the
  SAM.
(This used to be commit 7b830350eb)
1999-04-08 05:36:15 +00:00