1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-19 23:17:05 +03:00

278 Commits

Author SHA1 Message Date
Volker Lendecke
9ceff80327 r977: Implement 'net rpc group rename' -- rename domain groups.
Volker
2007-10-10 10:51:52 -05:00
Volker Lendecke
d7239c2611 r964: The max_size field in cli_samr_enum_als_groups is more like an account_control
field with indiviual bits what to retrieve. Set this to 0xffff as NT4
usrmgr.exe does to get everything. I'm too lazy (sorry) to get this through to
rpc_parse/ etc.

Volker
2007-10-10 10:51:51 -05:00
Volker Lendecke
ec32167496 r269: Patch from Krischan Jodies <kj@sernet.de>: Implement 'net rpc group delete'.
Volker
2007-10-10 10:51:16 -05:00
Volker Lendecke
4191a434d4 Two little annoyances:
net rpc did not inform you if no smbd is running.

I never liked the error message (!) Success! when we established a trust.

Volker
-
Volker Lendecke
3e39d157cb Another typo, sorry for samba-cvs spam :-) -
Volker Lendecke
8ba5bdc330 Fix typo.
Volker
-
Volker Lendecke
540f625036 net_rpc.c: Don't complain if [add|del]mem was successful.
srv_samr_nt.c: Correctly report that a user is not member of an alias.

Volker
-
Volker Lendecke
73f26de5c0 Print an informative error message if trying to add/remove members from
something not a group.

Volker
-
Volker Lendecke
e597420421 Add 'net rpc group [add|del]mem' for domain groups and aliases.
Volker
-
Volker Lendecke
e77fe4a77a Fix my fix to net rpc group list. We can certainly have more than a single
set of groups.

Volker
-
Volker Lendecke
76c75bb8a7 Add 'net rpc group add'. For this parse_samr.c had to be changed: The
group_info4 in set_dom_group_info also has the level in the record
itself. This seems not to be an align. Tested with NT4 usrmgr.exe. It can
still create a domain group on a samba machine.

Volker
-
Volker Lendecke
d713e76a24 Don't try to show groups that could not be listed.
Volker
-
Volker Lendecke
99f03a641e If there are no alias members, don't ask for their sids :-)
Volker
-
Gerald Carter
44db163b30 BUG 1055; patch from SATOH Fumiyasu <fumiya@miraclelinux.com>; formatting fixes for 'net share' -
Volker Lendecke
90fabe6ec0 Expand 'net rpc group members' to local groups.
Volker
-
Andrew Bartlett
6b629344c5 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
-
Andrew Bartlett
4c7d6b9be3 Add some help for 'net rpc password'.
Andrew Bartlett
-
Andrew Bartlett
ced7fb5527 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
-
Andrew Bartlett
2a2b1f0c87 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
-
Volker Lendecke
413ed77142 Fix compiler warning -
Jim McDonough
07d6ed4343 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.
-
Andrew Bartlett
7c34de8096 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
-
Andrew Bartlett
f9e59f8bc0 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
-
Volker Lendecke
5d0b8280f6 In the brief 'net rpc group' listing, don't cut off group names at 21 chars.
Volker
-
Volker Lendecke
39e4ee0c5b Implement 'net rpc group list [global|local|builtin]*' for a select listing of
the respective user databases.

Volker
-
Volker Lendecke
d5775b7106 Only ask for 512 names at a time.
Volker
-
Volker Lendecke
4e3a2eb8e0 Implement "net rpc group members": Get members of a domain group in
human-readable format.

Volker
-
Andrew Bartlett
9ecf9408d9 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
-
Jim McDonough
e660b04e8f 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).
-
Gerald Carter
e1fac713e2 fix some warnings found by the Sun C compiler -
Rafal Szczesniak
d46793b335 In case of 'net rpc trustdom add' without domain name we were silently
asking for password without a piece of error message or explanation.


rafal
-
Rafal Szczesniak
836746beab Give a temporary hint on how to delete trust account.
rafal
-
Herb Lewis
398bd14fc6 get rid of more compiler warnings -
Herb Lewis
6ec683e24e get rid of warning on IRIX -
Rafal Szczesniak
033ee6e687 Small typo fix found while testing domain trusts.
rafal
-
Jeremy Allison
ff222716a0 Removed strupper/strlower macros that automatically map to strupper_m/strlower_m.
I really want people to think about when they're using multibyte strings.
Jeremy.
-
Gerald Carter
d7f7fcda42 large change:
*)  consolidates the dc location routines again (dns
    and netbios)  get_dc_list() or get_sorted_dc_list()
    is the authoritative means of locating DC's again.

    (also inludes a flag to get_dc_list() to define
     if this should be a DNS only lookup or not)

    (however, if you set "name resolve order = hosts wins"
     you could still get DNS queries for domain name IFF
     ldap_domain2hostlist() fails.  The answer?  Fix your DNS
     setup)

*)  enabled DOMAIN<0x1c> lookups to be funneled through
    resolve_hosts resulting in a call to ldap_domain2hostlist()
    if lp_security() == SEC_ADS

*)  enables name cache for winbind ADS backend

*)  enable the negative connection cache for winbind
    ADS backend

*)  removes some old dead code

*)  consolidates some duplicate code

*)  moves the internal_name_resolve() to use an IP/port pair
    to deal with SRV RR dns replies.  The namecache code
    also supports the IP:port syntax now as well.

*)  removes 'ads server' and moves the functionality back
    into 'password server' (which can support "hostname:port"
    syntax now but works fine with defaults depending on
    the value of lp_security())
-
Volker Lendecke
e5664adc07 Fix for bug#3. Show comments when doing 'net group -l'.
Volker
-
Volker Lendecke
ec1a58d09e Working on bug#3. We want all of the aliases, so start with 0.
Volker
-
Andrew Bartlett
ca2e453c78 Fix compile. -
Volker Lendecke
2143446043 Set the password for a newly created trustdom account. Tested against
PDCs running NT4SP1, NT4SP6 and Samba 3.0.

Volker
-
Andrew Bartlett
b4645bf066 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
-
Rafal Szczesniak
8681cbae0d 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
-
Andrew Bartlett
542a8b1817 Turn down some DEBUG()s and remove some duplicate code spotted by dfenwick.
Andrew Bartlett
-
Jim McDonough
ca2886c938 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.
-
Tim Potter
ee78196bcf Merge of missed another while condition when enumerating aliases. -
Tim Potter
4998a72cf8 Merge:
>When calling cli_samr_enum_{dom,als}_groups in a while loop, the
>terminating condition should be result != STATUS_MORE_ENTRIES, not
>result == NT_STATUS_OK otherwise we get stuck in an infinite loop
>when there's any sign of trouble.
-
Andrew Bartlett
876e00fd11 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
-
Jeremy Allison
ff66d40970 Fixes to make SCHANNEL work in 3.0 against a W2K DC. Still need to fix
multi-PDU encode/decode with SCHANNEL. Also need to test against WNT DC.
Jeremy.
-
Jelmer Vernooij
f0982e1102 - Change ADS CHOSTPASS -> ADS CHANGETRUSTPW
- Add general CHANGETRUSTPW function that calls ADS CHANGETRUSTPW or RPC CHANGETRUSTPW
(Merged from HEAD)
-