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

1140 Commits

Author SHA1 Message Date
Volker Lendecke
bd1333ea74 Add 'net idmap restore'. This restores a broken idmap file
from the output of 'net idmap dump'.

'net idmap dump' now also prints the USER/GROUP HWM.

Volker
(This used to be commit c0575be936572bb091a77c58361bd3a4fe9549ff)
2003-06-14 17:51:09 +00:00
Andrew Bartlett
b85664047c This patch modifies 'net rpc vampire' to add new and existing users to both
the idmap and the SAM.

The basic idea is this:  Lookup the user with GetPwnam(), and if they
exist then use that uid.  This is what people expect.  If the user does
not exist, try and run the right script.

This is also what people expect from previous Samba 3.0 behaviour, where
the Get_Pwnam() was at runtime.

If the idmap entry for this SID isn't valid, or isn't the right value,
modify the idmap to account for this mapping.

Also, the same logic is applied to the primary gid - if it has changed,
update the user's primary unix group.

This patch allows users to be added without a mapping - this is fine for
machine accounts, for example.  I've given it a quick test against my
Win2k DC, and I *think* it's sane.

Andrew Bartlett
(This used to be commit d2a70bfff182352da50cd6c23ddfa80fe1b353c7)
2003-06-14 00:49:02 +00:00
Volker Lendecke
8ad364dd2e Trivial extension to 'net' to dump current local idmap.
(This used to be commit 18f3a5efea7c60d764d5ed82f3a83e1608f8c34e)
2003-06-13 16:19:02 +00:00
Volker Lendecke
e1f4d66b73 Fix for bug#3. Show comments when doing 'net group -l'.
Volker
(This used to be commit e5664adc07307a066c5312d9224cef2c69a40f77)
2003-06-12 16:21:22 +00:00
Volker Lendecke
c8667b03f8 Working on bug#3. We want all of the aliases, so start with 0.
Volker
(This used to be commit ec1a58d09e08583288b18747a0c82e5cf8139b63)
2003-06-12 15:37:06 +00:00
Richard Sharpe
09530bfa60 More updates on editreg.c to bring it better in line with the Samba source.
(This used to be commit dc69a638b9e12726f050d79b63f92f816c35fe8f)
2003-06-10 17:18:07 +00:00
Andrew Tridgell
0d556758de use lp_realm() to find the default realm for 'net ads password'
(This used to be commit 21d92802781ac224f569a990df3ec1070f0da434)
2003-06-10 04:15:55 +00:00
Andrew Bartlett
850554084c Make sure that we use schannel (if configured) when checking for a valid
join to the DC.

Andrew Bartlett
(This used to be commit af526fa9b39ab1f8483d5cee66321bc12f78ac05)
2003-06-08 11:39:28 +00:00
Jim McDonough
0463fc2d77 Fix bug #137: krb5_set_password is already defined in MIT 1.3 libs, so
we wouldn't build.
(This used to be commit 0e9836c4e9e71494b10d71a5f3d5f7da2888c5ef)
2003-05-30 19:51:09 +00:00
Jelmer Vernooij
2153494966 Setting account policy values is done using -C, not -V. Fixes bug #120
(This used to be commit daf443757b62bd3c254a303d638bfd030b4acd2a)
2003-05-29 22:00:54 +00:00
Jim McDonough
a3c5277a93 Fix bug #96: Use DNS decompression to properly parse cldap netlogon
packets, otherwise repeated components will not decode correctly.

Thanks to aliguori@us.ibm.com for the fix, and lukeh@padl.com for pointing
us to the right docs.
(This used to be commit a8d5d74cf80c6cae3eac1daa3f88d56373789560)
2003-05-20 13:51:43 +00:00
Jeremy Allison
5ffd33df94 Patch from "Alex Deiter" <tiamat@komi.mts.ru> to fix incorrect error check.
Jeremy.
(This used to be commit 43ca4b8a8425b97a6bea08b91420bac6cde807b3)
2003-05-15 17:23:35 +00:00
Jeremy Allison
6abef08100 Fix obvious compiler warnings.
Jeremy.
(This used to be commit 2a6d0c2481c3c34351e57c30a85004babdbf99b0)
2003-05-12 21:27:54 +00:00
Simo Sorce
c823b191ab And finally IDMAP in 3_0
We really need idmap_ldap to have a good solution with ldapsam, porting
it from the prvious code is beeing made, the code is really simple to do
so I am confident it is not a problem to commit this code in.

Not committing it would have been worst.
I really would have been able to finish also the group code, maybe we can
put it into a followin release after 3.0.0 even if it may be an upgrade
problem.

The code has been tested and seem to work right, more testing is needed for
corner cases.

Currently winbind pdc (working only for users and not for groups) is
disabled as I was not able to make a complete group code replacement that
works somewhat in a week (I have a complete patch, but there are bugs)

Simo.
(This used to be commit 0e58085978f984436815114a2ec347cf7899a89d)
2003-05-12 18:12:31 +00:00
Tim Potter
1a38fcb22a Re-enable secure channel for net rpc vampire.
Jump out of sam entry processing loop if the return value from
cli_netlogon_sam_sync() isn't OK or STATUS_MORE_ENTRIES.
(This used to be commit 47d8ee3679292ece5d86df11bc56c9b4d71f3d11)
2003-05-12 07:18:36 +00:00
Andrew Bartlett
69306dcdd9 Fix up a bit of my sloppy C.
(This used to be commit f67cc24acf37a9f46427c993574ecf261d7aec1a)
2003-05-12 01:49:03 +00:00
Andrew Bartlett
80f402837f Give up on the idea of avoiding lp_load() in ntlm_auth....
Also, we might be given a 0 length challenge, so don't smb_panic() for
smb_xmalloc() of zero size.

Andrew Bartlett
(This used to be commit 4842de04cf2e1528e726dfad070dfe3a82f46fa2)
2003-05-12 00:18:45 +00:00
Andrew Bartlett
ca40b71686 Make it possible to actually use --user-SID and --group-SID on a standard command line.
Andrew Bartlett
(This used to be commit dd14da756640ba36834a05b9da4759a809c0bb37)
2003-05-12 00:17:44 +00:00
Andrew Bartlett
4407869ad2 Fix compile.
(This used to be commit ca2e453c7838b6d0ed2d0a45124d162073bbbf99)
2003-05-11 23:49:36 +00:00
Volker Lendecke
0710bab071 Set the password for a newly created trustdom account. Tested against
PDCs running NT4SP1, NT4SP6 and Samba 3.0.

Volker
(This used to be commit 2143446043b2c29027cf69554caddf41274df709)
2003-05-11 16:59:06 +00:00
Jelmer Vernooij
0914e541f5 Reverse previous patch from Stefan and me after comments by Andrew Bartlett
(This used to be commit d817eaf0ecca2d878ab1ffcf7a747a02d71c811e)
2003-05-10 11:49:51 +00:00
Jelmer Vernooij
c507ebe567 Patch from metze and me that adds dummy smb_register_*() functions so
that is now possible to, for example, load a module which contains
an auth method into a binary without the auth/ subsystem built in.
(This used to be commit 74d9ecfe2dd7364643d32acb62ade957bd71cd0d)
2003-05-10 10:53:48 +00:00
Andrew Bartlett
d06f95ca78 Finally get NTLMv2 working on the client!
With big thanks to tpot for the ethereal disector, and for the base code
behind this, we now fully support NTLMv2 as a client.

In particular, we support it with direct domain logons (tested with ntlm_auth
--diagnostics), with 'old style' session setups, and with NTLMSSP.

In fact, for NTLMSSP we recycle one of the parts of the server's reply directly...

(we might need to parse for unicode issues later).

In particular, a Win2k domain controller now supplies us with a session key
for this password, which means that doman joins, and non-spnego SMB signing
are now supported with NTLMv2!

Andrew Bartlett
(This used to be commit 9f6a26769d345d319ec167cd0e82a45e1207ed81)
2003-05-09 14:42:20 +00:00
Jim McDonough
62c3744709 Fix bug #4 for net rap. Allow more than 50 chars for long form listings of users and groups.
(This used to be commit dcc6d9e76c737400aaffdd4f261fd0f191aaeea8)
2003-05-09 12:58:28 +00:00
Richard Sharpe
c3cad25e5e Sync up to head ...
(This used to be commit 045210e129e6e0aef8f847e7ed8714d0d9974e7f)
2003-05-09 07:43:07 +00:00
Richard Sharpe
f5dd6b2750 Sync to the changes in head ...
(This used to be commit 7f76eac5a0f93107d990b0fde651838c38970092)
2003-05-09 06:23:55 +00:00
Tim Potter
917c2fcf6a Added some more diagnostic tests to check out a theory that having either hash
- auth with ntlmv2 and lmv2 but deliberately break the ntlmv2 hash
  - auth with ntlmv2 and lmv2 but deliberately break the lmv2 hash
  - auth with ntlm and lm but deliberately break the ntlm hash
  - auth with ntlm and lm but deliberately break the lm hash

My theory is that the NTLM or NTLMv2 field must be correct and if it is,
it doesn't matter what the value of the LM or LMv2 field is.

Fixed cosmetic test name display bug.
(This used to be commit 5dcde9451bd0d6a7462b77cf5ed137bfd691adaa)
2003-05-09 06:03:11 +00:00
Richard Sharpe
01d58b75ea Fix up a bunch of problems in editreg.c
Now the build farm will no doubt find more.
(This used to be commit e91e648c9b0841fbffbc8f39e71abade0996a1e7)
2003-05-09 05:48:50 +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 5b3cb7725a974629d0bd8b707bc2940c36b8745e)
2003-05-08 08:02:52 +00:00
Andrew Bartlett
a0af88e8c1 Fix the spinning bug for 'net rpc user' as well - there are more errors in
this world than 'status more entires'...

Also move all the cases to 'NT_STATUS_EQUAL()' to test it.

Andrew Bartlett
(This used to be commit b4645bf0661dadcd077b21bb6f6452ed8b2eb726)
2003-05-07 22:56:02 +00:00
Richard Sharpe
7cd3bdc784 Fix up some of the warnings that the build farm is finding ...
(This used to be commit 29d775fe68be8988e344c35106a80d6ca8236e4d)
2003-05-05 22:52:45 +00:00
Richard Sharpe
5d653461e6 Syncronize head editreg.c with 3.0.0 ...
(This used to be commit 8257f537de57a2681e6d9cc2c421435b1d751a60)
2003-05-05 16:04:15 +00:00
Andrew Bartlett
9eccc216de We also get back the LM session key on pure 'NTLM' logins.
Andrew Bartlett
(This used to be commit 7342c70b4cecfc1f42c46b19360db6c077604be2)
2003-05-05 13:23:07 +00:00
Rafal Szczesniak
8be0f0d145 Turn off using lsa_qos in OpenPolicy call. This way we avoid annoying
debug msg while establishing trust and listing relations of Samba PDC.


Rafal
(This used to be commit 8681cbae0d142a1f9ac537cb22e611a6f5262b54)
2003-05-05 08:32:30 +00:00
Andrew Bartlett
89f6691cdc Add some comments.
(This used to be commit 855fab395f97dd232fd9bb78e62ad12b16fe2a24)
2003-05-05 06:33:58 +00:00
Andrew Bartlett
0e1c8fa7c3 Add some more tests to the ntlm_auth diagnositics package.
Our NTLMv2 client code needs work, becouse we don't get the session key for
any of the NTLMv2 stuff...

Also test some of the more 'odd' auth cases - like putting the NT password
into the LM feild.

Clean up some static globals into static locals.

Andrew Bartlett
(This used to be commit 62f0acc99166e9518f59bc5d091b76c35837e65c)
2003-05-05 05:01:59 +00:00
Tim Potter
c4c55a00db Fix some compiler warnings.
(This used to be commit 52d5ff7bdafabb421e76b6b19d95be22b380ddb4)
2003-05-05 02:47:41 +00:00
Andrew Bartlett
6a19f354e5 Patch from Ken Cross to allow an ADS domain join with a username of the form
user@realm, where realm might not be the realm we are joining.

Andrew Bartlett
(This used to be commit 00e08efb5cd21bf42be9125d3188efbf9d13b8b7)
2003-05-04 02:48:11 +00:00
Andrew Bartlett
aa79f23d9b Turn down some DEBUG()s and remove some duplicate code spotted by dfenwick.
Andrew Bartlett
(This used to be commit 542a8b1817d3930e03e08e16e9711cacceb6df61)
2003-05-01 02:51:49 +00:00
Andrew Bartlett
c6d511d8dd Merge from HEAD - the usual popt-needs-static for Sun CC.
(This used to be commit 2fabc356769477cc8bdbb23ecd8fee1e7d9fdb7d)
2003-04-30 14:25:13 +00:00
Andrew Bartlett
90d17c04ca Fix for AIX - you can't qualify a return type as const, when it's not a
pointer.

(merge from HEAD).

Andrew Bartlett
(This used to be commit 9e3d0cd9dea1234d6e6a26d03995b5edfaed5186)
2003-04-30 14:01:16 +00:00
Andrew Bartlett
e13d513739 Sun CC requires constant initialisers, so use a static here.
(a common bug with popt stuff, becouse it's fine with GCC).
(This used to be commit edbab685d181887f8cb055cc9dc175b2772bd0ff)
2003-04-30 13:22:02 +00:00
Gerald Carter
ada60ce8a2 smbgroupedit has been replaced by 'net groupmap'
remove related file.  Left in EHAD for reference (for now)
(This used to be commit 2e7537d8e29171bfddac984911c55cf567886956)
2003-04-29 15:32:14 +00:00
Jim McDonough
7b126ce7a0 Like net rpc user -l, let net ads user -l allow more than 50 characters in
comments.
(This used to be commit b5b1732b1144c9bcf5c3b08f6f9da9ad8875f5f7)
2003-04-29 15:15:31 +00:00
Jim McDonough
ad8e83f78f Allow net rpc user -l to list longer than 50 characters in a user comment.
Net.exe on windows won't allow more than 50 characters to be entered, but
through AD you can have much more than this.
(This used to be commit ca2886c9385361ea401e3e0b47c26cb39adcadbc)
2003-04-29 15:09:54 +00:00
Gerald Carter
c6d550b99b adding ifdef'd code to add alias membership for vampire
(This used to be commit 2557b94519fbb3110948a3c6a3f412622757d2b0)
2003-04-29 14:42:49 +00:00
Andrew Bartlett
281d95e2f3 Use a common function to create the SAM_ACCOUNT being used to add accounts
to the system.  This means that we always run Get_Pwnam(), and can never add
FOO when foo exists on the system (the idea is to instead add foo into
the passdb, using it's full name, RID etc).

Andrew Bartlett
(This used to be commit bb79b127e02cefae13c822fd0fd165f1f214b740)
2003-04-29 09:43:17 +00:00
Tim Potter
90dbd21cd0 Fix compiler warning.
(This used to be commit f127f964250c86986996afab905b40cff420bfd5)
2003-04-28 06:19:11 +00:00
Tim Potter
4ea3cd2629 Merge of const fixes from HEAD.
(This used to be commit a847ebd82732cc2b430c58c3b287a46db0e35ba1)
2003-04-28 05:18:30 +00:00
Simo Sorce
43b3ea968b back port from HEAD
(This used to be commit f7cfdf20b7b3b7743c0c3af4ff62fdde00e45fdc)
2003-04-26 01:15:57 +00:00