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

3076 Commits

Author SHA1 Message Date
Luke Leighton
eaac0923e0 rewrote policy handle code to be generic (it's needed for client-side too)
attempted to fix regsetsec command
0001-01-01 00:00:00 +00:00
Luke Leighton
447143be81 oops, freed argc,argv arguments twice. 0001-01-01 00:00:00 +00:00
Luke Leighton
9193f0eff5 attempted a svcset command. password is encrypted / messed up, therefore
command fails.
0001-01-01 00:00:00 +00:00
Luke Leighton
cbbfef6d2a oops!!!! wrong command!!! 0001-01-01 00:00:00 +00:00
Luke Leighton
d5869df371 adding svcctl 0x1b function 0001-01-01 00:00:00 +00:00
Luke Leighton
e88e7d529b shuffling msrpc code around so that it can be used independently of rpcclient 0001-01-01 00:00:00 +00:00
Luke Leighton
ca803c17fa the last one. that concludes the removal of all next_token() calls
from rpcclient/cmd_*.c.
0001-01-01 00:00:00 +00:00
Luke Leighton
3e76ca9b17 another four next_token() removals (using getopt instead) 0001-01-01 00:00:00 +00:00
Luke Leighton
b0f8ef6168 another two. 0001-01-01 00:00:00 +00:00
Luke Leighton
c1ba1bfd68 another one 0001-01-01 00:00:00 +00:00
Luke Leighton
de360d1e90 moved two more commands over to getopt. 0001-01-01 00:00:00 +00:00
Luke Leighton
9a1efa03c8 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.
0001-01-01 00:00:00 +00:00
Luke Leighton
1092b4f6fb implement server-side generation of NTLMv2 session key. YESSS :-) 0001-01-01 00:00:00 +00:00
Luke Leighton
ab174759cd you know what? this sort of thing makes me laugh. hmm, what functions
have we got.  and what data do we have.  hmm.. i wonder what the NTLMv2
user session key can be... hmmm... weell.... there's some hidden data
here, generated from the user password that doesn't go over-the-wire,
so that's _got_ to be involved.  and... that bit of data took a lot of
computation to produce, so it's probably _also_ involved... and md4 no, md5?
no, how about hmac_md5 yes let's try that one (the other's didn't work)
oh goodie, it worked!

i love it when this sort of thing happens.  took all of fifteen minutes to
guess it.  tried concatenating client and server challenges.  tried
concatenating _random_ bits of client and server challenges.  tried
md5 of the above.  tried hmac_md5 of the above.  eventually, it boils down
to this:

kr = MD4(NT#,username,domainname)
hmacntchal=hmac_md5(kr, nt server challenge)
sess_key = hmac_md5(kr, hmacntchal);
0001-01-01 00:00:00 +00:00
Luke Leighton
be6a6b1393 hmmm... have to add client-side support in domain_client_validate() to
_use_ user session key.
0001-01-01 00:00:00 +00:00
Luke Leighton
c73f6b0d02 adding user session key into network netlogon response. 0001-01-01 00:00:00 +00:00
Luke Leighton
e885027eb7 moving create user function into msrpc_samr.c 0001-01-01 00:00:00 +00:00
Luke Leighton
98c42764fb oops, #ifdef'd cli_shutdown out, as the fun has _already_ started:
NT refuses to play nice, and establish a trust relationship.
0001-01-01 00:00:00 +00:00
Luke Leighton
99ec0620c3 attempting to establish inter-domain trust relationships. modified
smbpasswd so it can be used to set up inter-domain trust account.
0001-01-01 00:00:00 +00:00
Luke Leighton
97ec74e1fa modified domain_client_validate to take trust account name / type. this
is to pass DOMAIN_NAME$ and SEC_CHAN_DOMAIN instead of WKSTA_NAME$ and
SEC_CHAN_WKSTA.

modified check_domain_security to determine if domain name is own domain,
and to use wksta trust account if so, otherwise check "trusting domains"
parameter and use inter-domain trust account if so, otherwise return
False.
0001-01-01 00:00:00 +00:00
Luke Leighton
3ec269b402 doing a code reshuffle. want to add code to establish trust relationships. 0001-01-01 00:00:00 +00:00
Luke Leighton
a51f62f4cf dynamic memory allocation i added a month ago: forgot to ZERO_STRUCT()
some of the server-side stuff.  Realloc() was being used, so it
Realloc()d some random area of memory.  oops.dynamic memory allocation i added a month ago: forgot to ZERO_STRUCT()
some of the server-side stuff.  Realloc() was being used, so it
Realloc()d some random area of memory.  oops.dynamic memory allocation i added a month ago: forgot to ZERO_STRUCT()
some of the server-side stuff.  Realloc() was being used, so it
Realloc()d some random area of memory.  oops.
0001-01-01 00:00:00 +00:00
Luke Leighton
f973195b5c adding bits about SAM database security, and what the SAM commands are
actually for.
0001-01-01 00:00:00 +00:00
Luke Leighton
b31de16407 explicit reference to tell people that rpcclient doesn't work with
Windows 95.  i can just imagine some people saying "it dunna wurk on
my box at home", and me having to reply, "i dunna care".
0001-01-01 00:00:00 +00:00
Luke Leighton
28a63ac24d yodl update 0001-01-01 00:00:00 +00:00
Luke Leighton
d8d1daff6f oops. 0001-01-01 00:00:00 +00:00
Luke Leighton
3a6900ad7b adding some command descriptions behind the rpcclient commands. 0001-01-01 00:00:00 +00:00
Luke Leighton
9eef1817f8 yodl update - rpcclient 0001-01-01 00:00:00 +00:00
Luke Leighton
a46b33079f added an rpcclient man page. wow! 0001-01-01 00:00:00 +00:00
Luke Leighton
9795e5948c nt5rc2 falling over because the LsaQueryInfoPolicy() response _must_
have the string max length = string length + 1.

if not, then it gets its knickers in a twist over whether the string
is NULL-terminated or not.

four days.

four days i spent on this one.
0001-01-01 00:00:00 +00:00
Luke Leighton
172601b84a The First Necessary UNICODE String Support.
the random workstation trust account password is TOTAL garbage.  i mean,
complete garbage.  it's nowhere CLOSE to being a UNICODE string.  therefore
we can't just take every second character.

created nt_owf_genW() which creates NT#(password) instead of NT#(Unicode(pw)).
followed through to the password setting in srv_samr.c
0001-01-01 00:00:00 +00:00
Luke Leighton
3152bde7d8 - surprise! the number of UNICODE strings that didn't have alignment
after them is incredible.  how did we get away with this for so long?
0001-01-01 00:00:00 +00:00
Luke Leighton
8e406c1fa2 - bug in nmbd registering DOMAIN_NAME<1c> to WINS server; recursion
desired flag MUST be set in any NBT UDP packets sent to a WINS
  server, else they will go to the WINS client side of the NT NetBIOS
  kernel instead, and will get trashed.

- added \PIPE\browser server-side code.
0001-01-01 00:00:00 +00:00
Luke Leighton
569babb393 added \PIPE\browser plus experimental brsinfo command. you wouldn't
believe the XXXX that MIGHT be involved in getting nt5rc2 to join
a samba domain...
0001-01-01 00:00:00 +00:00
Luke Leighton
4aea261cb0 responses to UDP samquery go back to SERVER<00> not DOMAIN<1c>, the
request name.

modified createuser rpcclient command to examine name being added.  if it
ends in a $, assume that a workstation trust account is being added.
0001-01-01 00:00:00 +00:00
Luke Leighton
a8801942f7 set "key does not exist" response to reg_query_val() (win32 status code
of 0x2).  [p.s. getting REALLY bored of this nt5rc2->samba domain stuff].
0001-01-01 00:00:00 +00:00
Luke Leighton
c3913f8ae2 added samuserset2 rpcclient command to test ACB_XXX bit-setting on
samr opcode 0x25.  _yet_ another failed attempt to get nt5rc2 to join
a samba domain.  what _is_ it with this stuff, dammit?
0001-01-01 00:00:00 +00:00
Luke Leighton
3df7c903c5 updating reg_value_info() parsing code to take BUFFER2 instead of just
a char*.  now copes with multiple types.
0001-01-01 00:00:00 +00:00
Luke Leighton
98ddeaf442 added regqueryval command (experimental) to get reg_io_q_info() and
reg_io_r_info() working properly.  previously they weren't well
understood (well, they were the first of the registry functions i did,
back in december 97, ok??? :-)

set ntversion to 0x1 in SAMQUERY, so that we reply same as NT4 srv.
0001-01-01 00:00:00 +00:00
Luke Leighton
70b2c1ecbb attempting to get nt5 wksta to join domain.
1) had to fix samr "create user" and "set user info" (level 23).

2) had to fix netlogon enum trust domains

3) registry key needed \\ in it not \.
0001-01-01 00:00:00 +00:00
Luke Leighton
71f1213867 added two new params: "trusted domains" and "trusting domains".
these _may_ not actually ever get used, as trust relationships
really need to be established with shared secrets, and you need
to get the SID of the trusted and trusting domains, so this
may have to go in a private/xxx.mac file.
0001-01-01 00:00:00 +00:00
Luke Leighton
b51fa05c82 added another dummy key so that NT5 can check in the registry whether
password changes are allowed or not.  *dur*!!!!
0001-01-01 00:00:00 +00:00
Luke Leighton
3273bc068d oops, mistake in parsing command-arguments. repeated calls to
next_token() should not have line to parse as first arg.  oops.
0001-01-01 00:00:00 +00:00
Luke Leighton
df5ee2bd42 Shirish Kalele <kalele@veritas.com> noticed that NT workstations are
sending anonymous NTLMSSP user credentials to set up \PIPE\samr.
added anonymous NTLMSSP sessions.
0001-01-01 00:00:00 +00:00
Richard Sharpe
70274b5253 Changes to implement NET_AUTH based on NET_AUTH2, to get Win2000
happier in joining a Samba domain.
0001-01-01 00:00:00 +00:00
Luke Leighton
60b0840106 added server-side samr enum domains. fixed some parsing issues, server-side. 0001-01-01 00:00:00 +00:00
Luke Leighton
3146aa6b60 added rpcclient "enumdomains" command. enumerates names of domains
for which a PDC is responsible.  typical answers are:
<Name of Domain> plus <Builtin>.

against a hierarchical, down-level-compatible NT5 PDC, there's likely to
be more than these two entries!!!!!
0001-01-01 00:00:00 +00:00
Luke Leighton
25c70e3c98 - added DCE/RPC "fault" PDU support.
- disabled (AGAIN) the GETDC "if (MAILSLOT\NTLOGON)" code that will get
NT5rc2 to work but WILL break win95 (AGAIN).  this needs _not_ to be
re-enabled but to be replaced with a better mechanism.

- added SMBwrite support (note: SMBwriteX already existed) as NT5rc2 is
sending DCE/RPC over SMBwrite not SMBwriteX.
0001-01-01 00:00:00 +00:00
Luke Leighton
cc2ce2b755 split array-handling functions into separate module. 0001-01-01 00:00:00 +00:00
Luke Leighton
e6e5caf16c debugging rpcclient spoolenum and spooljobs commands. oh, did i forget
to mention, there's a spooljobs <printer name> command, and it uses
command-line completion?  prints out NT print jobs really nicely, too.
0001-01-01 00:00:00 +00:00