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

1327 Commits

Author SHA1 Message Date
Christopher R. Hertel
1e98a1b4cc Fixed test and wording for long share names.
The RAP NetShareEnum() call has a length limit of 12 characters (not 8, as
previously tested).  Took DaveCB's suggested and added a note listing some
of the client systems that might be affected.
(This used to be commit be06e52ce0)
2003-09-15 17:01:26 +00:00
Simo Sorce
1389acb537 fix online help
-w option need the password on the command line
(This used to be commit fa7dea1710)
2003-09-15 14:13:35 +00:00
Tim Potter
5cf58a1b98 Fix error message when calling namedtogid() fails adding a group map
entry.  Bug #431.
(This used to be commit bc8a181477)
2003-09-11 01:57:08 +00:00
Tim Potter
4059dfcca2 Fix error return path memory leaks in vampire code for creating users.
Display an error if we can't create a posix account for the user
(e.g no add user/machine script was specified; bug #323).
(This used to be commit 0c35ba2cd6)
2003-09-10 06:58:41 +00:00
Tim Potter
51297321ba Use opt_target_workgroup instead of lp_workgroup() in vampire code so
we can override the value in smb.conf with the -w option.

Migrating accounts from another domain can now be done like:

# bin/net join bdc -w nt4dom -Uadministrator%password
# bin/net rpc vampire -w nt4dom -U administrator%password
(This used to be commit d7bd3c1efb)
2003-09-10 06:49:13 +00:00
Tim Potter
ab87cee6cb Formatting fixups for help output.
(This used to be commit c030d14019)
2003-09-10 06:15:07 +00:00
Jeremy Allison
206d0f4156 Fix for incorrect error message - found by Alex Davis <alex14641@yahoo.com>.
Jeremy.
(This used to be commit 28631ef23f)
2003-09-08 18:41:42 +00:00
Volker Lendecke
1c38391c70 Nobody complained on the team-list, so commit it ...
This implements some kind of improved AFS support for Samba on Linux with
OpenAFS 1.2.10. ./configure --with-fake-kaserver assumes that you have
OpenAFS on your machine. To use this, you have to put the AFS server's KeyFile
into secrets.tdb with 'net afskey'. If this is done, on each tree connect
smbd creates a Kerberos V4 ticket suitable for use by the AFS client and
gives it to the kernel via the AFS syscall. This is meant to be very
light-weight, so I did not link in a whole lot of libraries to be more
platform-independent using the ka_SetToken function call.

Volker
(This used to be commit 5775690ee8)
2003-09-07 16:36:13 +00:00
Gerald Carter
7544b0c773 fixes for ads domain membership when only the realm is defined in
smb.conf

Fixes to ensure we work with disable netbios = yes
(This used to be commit 3913e43724)
2003-09-05 17:57:45 +00:00
Tim Potter
e414564eb6 Fix for bug #73. Name types can be specified using name#type notation.
Also added shortcut so that 'net lookup foo#1b' works.
(This used to be commit f38679201e)
2003-09-05 04:40:10 +00:00
Gerald Carter
bf0f3be29d Check in Andrew's fix for bug #305 (always use lp_realm() )
Also make sure thet ads_startup uses lp_realm instead of
just relying on the workgroup name.  Fixes bug in net ads join
when the workgroup defaults to "WORKGROUP" and we ignore the
realm name.
(This used to be commit b1763ace4e)
2003-09-04 19:45:04 +00:00
Tim Potter
0869073b7b Fix bug 342. Short version of --add now -a instead of -A.
(This used to be commit 233568dd6b)
2003-09-01 10:43:21 +00:00
Tim Potter
0548123153 We don't need to #include memory.h here. It's a BSD'ism and just includes
string.h anyways.
(This used to be commit 71034cede8)
2003-08-31 23:58:55 +00:00
Tim Potter
48cb8f8d5f Fix some compiler warnings.
(This used to be commit f566de0541)
2003-08-29 01:33:00 +00:00
Jeremy Allison
afe845235a Fixed warnings in secret code.
Jeremy.
(This used to be commit 86ebf99043)
2003-08-28 23:38:13 +00:00
Gerald Carter
494bb81bb0 fixing typos pointed out by Vance in WHATSNEW
Include patch to manually set the machine trust account
password (on request from jht) to mimic 2.2. behavior.

last changes before RC2 (not counting syncing the docs).
(This used to be commit ce09037144)
2003-08-28 20:24:25 +00:00
Jeremy Allison
e88593f1c0 Ensure nmblookup correctly converts from CH_DOS to CH_UNIX when displaying
a printable name on node status.
Jeremy.
(This used to be commit 6585446afd)
2003-08-22 00:13:42 +00:00
Gerald Carter
8bfe26b62d metze's autogenerate patch for version.h
(This used to be commit ae452e51b0)
2003-08-20 17:13:38 +00:00
Andrew Bartlett
f1be3a5c5d - Make 'net' use a single funciton for setting the 'use machine account' code.
- Make winbindd try to use kerberos for connections to DCs, so that it can
   access RA=2 servers, particularly for netlogon.
 - Make rpcclient follow the new flags for the NETLOGON pipe
 - Make all the code that uses schannel use the centralised functions for doing so.

Andrew Bartlett
(This used to be commit 96b4187963)
2003-08-19 22:47:10 +00:00
Rafal Szczesniak
b1993600e6 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
(This used to be commit d46793b335)
2003-08-15 21:57:59 +00:00
Rafal Szczesniak
bb6fb2880b Give a temporary hint on how to delete trust account.
rafal
(This used to be commit 836746beab)
2003-08-15 19:47:10 +00:00
Jelmer Vernooij
c574bf0ced Print more than 1 packet in hex mode
(This used to be commit 28f1d7b201)
2003-08-15 16:13:59 +00:00
Jelmer Vernooij
22535011e2 Add ability to output native pcap files without the requirement for text2pcap.
IP and TCP checksums are not calculated, but that should not matter.
(This used to be commit aa96f78001)
2003-08-15 05:31:46 +00:00
Herb Lewis
aa39cc37da get rid of more compiler warnings
(This used to be commit 398bd14fc6)
2003-08-15 04:42:05 +00:00
Volker Lendecke
4ad85bf48e Add the gss-spnego kerberos server side to ntml_auth. This uses the
same ads_verify_ticket routine that smbd uses, so in the current state
we have to be have the host password in secrets.tdb instead of the
keytab. This means we have to be an ADS member, but it's a start.

Volker
(This used to be commit dc2d2ad467)
2003-08-15 02:57:59 +00:00
Jelmer Vernooij
7753ed9acf Fix some memory issues. It is now possible to convert extract packet data
from a samba log file and view it in ethereal, including the DCE/RPC, RAP, etc
calls that are contained in a packet, just like you would with a real
network sniff!
(This used to be commit 6a76750dc4)
2003-08-15 02:18:20 +00:00
Herb Lewis
d294d4b98f get rid of warning on IRIX
(This used to be commit 6ec683e24e)
2003-08-15 02:01:56 +00:00
Volker Lendecke
db5355cb3a Don't ask, it's too embarrassing :-)
Actually let the user explicitly specify a rid...

Volker
(This used to be commit 3aed9c8a4a)
2003-08-15 01:55:06 +00:00
Jelmer Vernooij
c8061de1ed Get packet contents correct as well.
(This used to be commit b4499c8aab)
2003-08-15 01:30:10 +00:00
Jelmer Vernooij
6c396ea577 Add utility that takes a samba log file (at least level 5 for headers and
10 for data contents as well) and creates a packet trace readable by
ethereal.

What does not work yet:
 - SMB data contents (log level 5)
 - SMB data contents beyond the 512 byte range (log level 99 or something?)
(This used to be commit 95b1d4933b)
2003-08-15 00:04:20 +00:00
Jelmer Vernooij
273c37d1c1 Makefile.in
(This used to be commit e8dc799ffb)
2003-08-15 00:00:22 +00:00
Volker Lendecke
fbf072599b Fix the build for non-kerberos environments.
Volker
(This used to be commit c8f4d7952f)
2003-08-14 17:21:22 +00:00
Rafal Szczesniak
1a43ca5ace Small typo fix found while testing domain trusts.
rafal
(This used to be commit 033ee6e687)
2003-08-13 20:53:48 +00:00
Volker Lendecke
5929cfd451 This adds *experimental* kerberos gss spnego client support to ntlm_auth.
(This used to be commit 5522c79045)
2003-08-12 20:50:56 +00:00
Volker Lendecke
1d67e6b225 Some more shuffling around gss-spnego server
(This used to be commit f2c85595da)
2003-08-12 19:00:08 +00:00
Jeremy Allison
4511b334a8 Test invalid map system, map hidden, create mask, force create mask
parameters. Fix return code for Samba 4 torture tester.
Jeremy.
(This used to be commit c043835c87)
2003-08-12 04:28:22 +00:00
Volker Lendecke
61a1fa97af Clarify gss spnego ntlmssp server a bit
(This used to be commit 807b452a7f)
2003-08-12 01:54:26 +00:00
Tim Potter
dffd0f379f Fix for bug 269. Change wbinfo and ntlm_auth to convert domain, username
and workstation to utf8 before sending the winbindd request.  Also, don't
continue when the call to pull_utf8() fails but rather return a winbind
error.  (This is what was causing the crash)
(This used to be commit ca1c463360)
2003-08-12 00:46:15 +00:00
Jeremy Allison
110abf10d2 Turns out I had my packet sequences wrong for oplock break code.
I was storing the mid of the oplock break - I should have been
storing the mid from the open. There are thus 2 types of deferred
packet sequence returns - ones that increment the sequence number
(returns from oplock causing opens) and ones that don't (change notify
returns etc). Running with signing forced on does lead to some
interesting tests :-).
Jeremy.
(This used to be commit 85907f02ce)
2003-08-07 02:59:52 +00:00
Jeremy Allison
4461109416 Cosmetic fix from waider@waider.ie.
Jeremy.
(This used to be commit cb326c2dbf)
2003-08-07 01:04:57 +00:00
Volker Lendecke
923cb1b731 When doing 'net groupmap add', default to algorithmic mapping for the rid.
Volker
(This used to be commit 7ce94d39ad)
2003-08-06 09:24:11 +00:00
Volker Lendecke
a4954bd3d2 Changes to make gss-spnego ntlmssp client work against W2k AD.
Now I know where the mechListMIC changes came from: Ethereal ;-)

Volker
(This used to be commit 4e9eed1273)
2003-08-04 13:10:43 +00:00
Volker Lendecke
f5b5a9793a Add ntlmssp client support to ntlm_auth. Find the corresponding cyrus sasl
module under http://samba.sernet.de/cyrus-gss-spnego.diff

Volker
(This used to be commit a82f6a0096)
2003-08-01 07:59:23 +00:00
Volker Lendecke
deb62c1410 Fixes for memory leaks in gss spnego handling by aliguori.
Volker
(This used to be commit 946695242f)
2003-07-31 10:24:10 +00:00
Jeremy Allison
29ca70cd34 Add a command line option (-S on|off|required) to enable signing on client
connections. Overrides smb.conf parameter if set.
Jeremy.
(This used to be commit 879309671d)
2003-07-30 23:49:29 +00:00
Volker Lendecke
7730b658a1 This adds gss-spnego to ntlm_auth. It contains some new spnego support
from Jim McDonough. It is to enable cyrus sasl to provide the
gss-spnego support. For a preliminary patch to cyrus sasl see

http://samba.sernet.de/cyrus-gss-spnego.diff

Volker
(This used to be commit 45cef8f66e)
2003-07-29 15:00:38 +00:00
Tim Potter
4db6b05e13 Typo fix for bug 258.
(This used to be commit a4e342c20c)
2003-07-29 02:34:18 +00:00
Andrew Bartlett
5ab880d684 Use the specified workgroup in 'net ads'. (Defaults to lp_workgroup()).
Andrew Bartlett
(This used to be commit e6cc5ca780)
2003-07-27 03:42:10 +00:00
Jeremy Allison
9fc34cafa2 Ensure all code paths set add_script.
Jeremy.
(This used to be commit 0021c83ff6)
2003-07-27 00:20:45 +00:00
Gerald Carter
3a5dc7c2ec convert snprintf() calls using pstrings & fstrings
to pstr_sprintf() and fstr_sprintf() to try to standardize.
lots of snprintf() calls were using len-1; some were using
len.  At least this helps to be consistent.
(This used to be commit 9f835b85dd)
2003-07-23 12:33:59 +00:00
Tim Potter
c9bc4b27b7 Another round of uid/gid/pid format string changes I missed the
first time.
(This used to be commit 6616485dba)
2003-07-22 06:52:39 +00:00
Tim Potter
80c1f1d865 Fixup a bunch of printf-style functions and debugs to use unsigned long when
displaying pid_t, uid_t and gid_t values.  This removes a whole lot of warnings
on some of the 64-bit build farm machines as well as help us out when 64-bit
uid/gid/pid values come along.
(This used to be commit f93528ba00)
2003-07-22 04:31:20 +00:00
Tim Potter
274f1f8806 Replace the eight (!) copies of dummy become/unbecome root with a single one.
(This used to be commit 8b818ce381)
2003-07-22 00:20:53 +00:00
Rafal Szczesniak
fb56f58fbc According to the result of voting, net has default debug level with
ability to change it by command line instead of turn-off cmdline switch
for debug messages.
It's a bit more comfortable to use now.
(This used to be commit b65fe75bec)
2003-07-19 00:23:08 +00:00
Jeremy Allison
4fbbaff415 Add API framework for server SMB signing.
Jeremy.
(This used to be commit 61fc9a7b2e)
2003-07-16 21:06:21 +00:00
Gerald Carter
a84270ce11 fixes for 'net rpc vampire'. I can now take a blank Samba host
and migrate an NT4 domain and still logon from domain members
(tested logon scripts, system policies, profiles, & home directories)
(passdb backend = tdbsam)

removed call to idmap_init_wellknown_sids() from winbindd.c
since the local domain should be handled by the guest passdb backend
(and you don't really always want the Administrator account to be root)
...and we didn't pay attention to this anyways now.
(This used to be commit 837d7c54d3)
2003-07-16 02:20:53 +00:00
Volker Lendecke
c9d6c786a1 Fix memleak
(This used to be commit 517bb4d0df)
2003-07-15 17:27:39 +00:00
Alexander Bokovoy
8c4be2bbc9 Add support for MSG_SMB_CONF_UPDATED and MSG_SHUTDOWN to all daemons (smbd, nmbd, winbindd). Reviewed by jerry and tridge.
(This used to be commit 02c5e2fc6f)
2003-07-15 17:21:21 +00:00
Volker Lendecke
7a88267a6a Jim, could you please look at this? smbpasswd -a <username> was broken
for me without this patch. I'm not sure if I interpreted your patch to
this code right.

Thanks,

Volker
(This used to be commit 46ec022f87)
2003-07-15 16:07:50 +00:00
Jim McDonough
e1725f0c04 Doesn't re-prompt for password when it is specified on the cmdline
(This used to be commit 6ebe87d318)
2003-07-11 14:33:03 +00:00
Gerald Carter
03d5867d52 moving more code around.
* move rid allocation into IDMAP.  See comments in _api_samr_create_user()
  * add winbind delete user/group functions

I'm checking this in to sync up with everyone.  But I'm going to split
the add a separate winbindd_allocate_rid() function for systems
that have an 'add user script' but need idmap to give them a RID.
Life would be so much simplier without 'enable rid algorithm'.
The current RID allocation is horrible due to this one fact.
Tested idmap_tdb but not idmap_ldap yet.  Will do that tomorrow.

Nothing has changed in the way a samba domain is represented, stored,
or search in the directory so things should be ok with previous installations.

going to bed now.
(This used to be commit 0463045cc7)
2003-07-11 05:33:40 +00:00
Rafal Szczesniak
5af1d7cc9c Just a few formatting fixed caught while testing.
rafal
(This used to be commit 156554738c)
2003-07-10 23:22:09 +00:00
Volker Lendecke
7f3f878abb pdbedit should not call idmap anymore. Otherwise pdbedit -L would
allocate id's.

Volker
(This used to be commit 0358cc7675)
2003-07-10 14:21:43 +00:00
Gerald Carter
16ff7b26f6 Large set of changes to add UNIX account/group management
to winbindd.  See README.idmap-and-winbind-changes for details.
(This used to be commit 1111bc7b0c)
2003-07-09 16:44:47 +00:00
Gerald Carter
816724fb39 more compile fixes for become/unbecome_root()
(This used to be commit f005f1cf12)
2003-07-09 03:32:07 +00:00
Gerald Carter
0b18acb841 and so it begins....
* remove idmap_XX_to_XX calls from smbd.  Move back to the
  the winbind_XXX and local_XXX calls used in 2.2

* all uid/gid allocation must involve winbindd now

* move flags field around in winbindd_request struct

* add WBFLAG_QUERY_ONLY option to winbindd_sid_to_[ug]id()
  to prevent automatic allocation for unknown SIDs

* add 'winbind trusted domains only' parameter to force a domain member
  server to use matching users names from /etc/passwd for its domain
  (needed for domain member of a Samba domain)

* rename 'idmap only' to 'enable rid algorithm' for better clarity
  (defaults to "yes")

code has been tested on

  * domain member of native mode 2k domain
  * ads domain member of native mode 2k domain
  * domain member of NT4 domain
  * domain member of Samba domain
  * Samba PDC running winbindd with trusts

Logons tested using 2k clients and smbclient as domain users
and trusted users. Tested both 'winbind trusted domains only = [yes|no]'

This will be a long week of changes.  The next item on the list is
winbindd_passdb.c & machine trust accounts not in /etc/passwd (done
via winbindd_passdb)
(This used to be commit 8266dffab4)
2003-07-07 05:11:10 +00:00
Andrew Bartlett
85921dbd6f Add some debug statments to our vampire code - try to make it easier to track
down failures.

Add a 'auto-add on modify' feature to guestsam

Fix some segfault bugs on no-op idmap modifications, and on new idmappings that
do not have a DN to tack onto.

Make the 'private data' a bit more robust.

Andrew Bartlett
(This used to be commit 6c48309cda)
2003-07-05 10:39:41 +00:00
Andrew Bartlett
a3ddfa5069 Fixes to our LDAP/vampire codepaths:
- Try better to add the appropriate mapping between UID and SIDs, based
   on Get_Pwnam()
 - Look for previous users (lookup by SID) and correctly modify the existing
   entry in that case
 - Map the root user to the Admin SID as a 'well known user'
 - Save the LDAPMessage result on the SAM_ACCOUNT for use in the next 'update'
   call on that user.  This means that VL's very nice work on atomic LDAP
   updates now really gets used properly!
 - This also means that we know the right DN to update, without the extra
   round-trips to the server.

Andrew Bartlett
(This used to be commit c7118cb31d)
2003-07-05 09:46:12 +00:00
Andrew Bartlett
4168d61fb2 This patch cleans up some of our ldap code, for better behaviour:
We now always read the Domain SID out of LDAP.  If the local secrets.tdb
is ever different to LDAP, it is overwritten out of LDAP.   We also
store the 'algorithmic rid base' into LDAP, and assert if it changes.
(This ensures cross-host synchronisation, and allows for possible
integration with idmap).  If we fail to read/add the domain entry, we just
fallback to the old behaviour.

We always use an existing DN when adding IDMAP entries to LDAP, unless
no suitable entry is available.  This means that a user's posixAccount
will have a SID added to it, or a user's sambaSamAccount will have a UID
added.  Where we cannot us an existing DN, we use
'sambaSid=S-x-y-z,....' as the DN.

The code now allows modifications to the ID mapping in many cases.

Likewise, we now check more carefully when adding new user entires to LDAP,
to not duplicate SIDs (for users, at this stage), and to add the sambaSamAccount
onto the idmap entry for that user, if it is already established (ensuring
we do not duplicate sambaSid entries in the directory).

The allocated UID code has been expanded to take into account the space
between '1000 - algorithmic rid base'.  This much better fits into what
an NT4 does - allocating in the bottom part of the RID range.

On the code cleanup side of things, we now share as much code as
possible between idmap_ldap and pdb_ldap.

We also no longer use the race-prone 'enumerate all users' method for
finding the next RID to allocate.  Instead, we just start at the bottom
of the range, and increment again if the user already exists.  The first
time this is run, it may well take a long time, but next time will just
be able to use the next Rid.

Thanks to metze and AB for double-checking parts of this.

Andrew Bartlett
(This used to be commit 9c595c8c23)
2003-07-04 13:29:42 +00:00
Jeremy Allison
ce72beb2b5 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.
(This used to be commit ff222716a0)
2003-07-03 19:11:31 +00:00
Tim Potter
ecb86e5e88 Some fixes for ads printer publish:
- check error return for cli_full_connection() when trying to obtain
    printer data

  - check error return on ads_find_machine_acct()

  - Minor reformatting to separate fetching printer data from publishing it
(This used to be commit 94fe3b2cdf)
2003-07-03 05:58:55 +00:00
Tim Potter
baf439cd55 Implemented 'net ads printer search' which searches the directory for
published printers.

At the moment we don't search using any parameters but this can be
fixed by changing the LDAP search string.  Also we should contact
the global catalog at SRV _gc._tcp instead of the ldap server we
get back from ads_startup().
(This used to be commit 814519c5de)
2003-07-03 05:08:51 +00:00
Tim Potter
8a8243b4fe #ifdef out apparently unused function.
(This used to be commit 9324703066)
2003-07-02 01:09:17 +00:00
Tim Potter
9d4b66c974 Yet more shadow variable warnings.
(This used to be commit b401e78b6e)
2003-06-30 05:45:27 +00:00
Jeremy Allison
0e983b32fd Some const correctness. Stop tdb being used as a remote backend. If an
idmap backend is specified cause smbd to ask winbindd (use winbindd if
you want a consistant remote backend solution).
Should work well enough for next beta now...
Jeremy.
(This used to be commit 8f830c509a)
2003-06-27 20:55:48 +00:00
Gerald Carter
f51d769dd3 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())
(This used to be commit d7f7fcda42)
2003-06-25 17:41:05 +00:00
Jeremy Allison
98689251bb Fixes from Martin Dorey <mdorey@bluearc.com> to only ask for and change
the requested parts of the ACL.
Jeremy.
(This used to be commit c35a88201c)
2003-06-24 01:09:36 +00:00
Simo Sorce
f5974dfaae Found out a good number of NT_STATUS_IS_ERR used the wrong way.
As abartlet rememberd me NT_STATUS_IS_ERR != !NT_STATUS_IS_OK

This patch will cure the problem.
Working on this one I found 16 functions where I think NT_STATUS_IS_ERR() is
used correctly, but I'm not 100% sure, coders should check the use of
NT_STATUS_IS_ERR() in samba is ok now.

Simo.
(This used to be commit c501e84d41)
2003-06-22 10:09:52 +00:00
Andrew Bartlett
4830a87845 (fixing bug in my last commit)
This isn't C++ - start your code *after* all the variables are declared...

Andrew Bartlett
(This used to be commit b7760faedc)
2003-06-21 23:35:12 +00:00
Andrew Bartlett
668a9af94e This removes the StrCaseCmp() stuff from 'net idmap' and 'net
groupmap'.  The correct way to implement this stuff is via a function
table, as exampled in all the other parts of 'net'.

This also moves the idmap code into a new file.  Volker, is this your
code?  You might want to put your name on it.

Andrew Bartlett
(This used to be commit 477f2d9e39)
2003-06-21 08:35:30 +00:00
Jim McDonough
480918598b Fix bug #136. Add message about erroneous empty "passdb backend" parameter.
(This used to be commit 897125a9db)
2003-06-20 17:41:04 +00:00
Simo Sorce
75a5c0b307 Ok, this patch removes the privilege stuff we had in, unused, for some time.
The code was nice, but put in the wrong place (group mapping) and not
supported by most of the code, thus useless.

We will put back most of the code when our infrastructure will be changed
so that privileges actually really make sense to be set.

This is a first patch of a set to enhance all our mapping code cleaness and
stability towards a sane next beta for 3.0 code base

Simo.
(This used to be commit e341e7c49f)
2003-06-18 15:24:10 +00:00
Richard Sharpe
2740d35a7b Replace all use of bzero with memset ...
(This used to be commit e21aab516b)
2003-06-16 17:49:01 +00:00
Volker Lendecke
979c447060 This glosses over John's problem at SambaXP 2003. When we want to join
a NT4 domain as a BDC with an existing workstation account (existing
bdc is fine), we fail. Print a friendly error message in this case.

The correct solution would probably be to delete the account and try
again. But even this makes us better than NT: NT4 fails in this
situation with an empty warning message box and an unusable BDC. It
has unsuccessfully tried to suck down the domain database, and thus
has no administrator account to log in after reboot....

Volker
(This used to be commit 1ddeea2179)
2003-06-16 15:59:05 +00:00
Volker Lendecke
e2cda4a24e Fix misleading debug message.
Volker
(This used to be commit a4f76f2520)
2003-06-16 10:10:37 +00:00
Tim Potter
6a2b43db9c Make net rpc vampire return an error if the sam sync RPC returns an error.
E.g if we are pointing at a win2k native mode domain we are returned
an NT_STATUS_NOT_SUPPORTED error.
(This used to be commit 6053c30f26)
2003-06-16 05:39:26 +00:00
Andrew Tridgell
1209615504 another improved debug statement
(This used to be commit ac69b9c83c)
2003-06-16 01:13:17 +00:00
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 c0575be936)
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 d2a70bfff1)
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 18f3a5efea)
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 e5664adc07)
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 ec1a58d09e)
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 dc69a638b9)
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 21d9280278)
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 af526fa9b3)
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 0e9836c4e9)
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 daf443757b)
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 a8d5d74cf8)
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 43ca4b8a84)
2003-05-15 17:23:35 +00:00
Jeremy Allison
6abef08100 Fix obvious compiler warnings.
Jeremy.
(This used to be commit 2a6d0c2481)
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 0e58085978)
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 47d8ee3679)
2003-05-12 07:18:36 +00:00
Andrew Bartlett
69306dcdd9 Fix up a bit of my sloppy C.
(This used to be commit f67cc24acf)
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 4842de04cf)
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 dd14da7566)
2003-05-12 00:17:44 +00:00
Andrew Bartlett
4407869ad2 Fix compile.
(This used to be commit ca2e453c78)
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 2143446043)
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 d817eaf0ec)
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 74d9ecfe2d)
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 9f6a26769d)
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 dcc6d9e76c)
2003-05-09 12:58:28 +00:00
Richard Sharpe
c3cad25e5e Sync up to head ...
(This used to be commit 045210e129)
2003-05-09 07:43:07 +00:00
Richard Sharpe
f5dd6b2750 Sync to the changes in head ...
(This used to be commit 7f76eac5a0)
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 5dcde9451b)
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 e91e648c9b)
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 5b3cb7725a)
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 b4645bf066)
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 29d775fe68)
2003-05-05 22:52:45 +00:00
Richard Sharpe
5d653461e6 Syncronize head editreg.c with 3.0.0 ...
(This used to be commit 8257f537de)
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 7342c70b4c)
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 8681cbae0d)
2003-05-05 08:32:30 +00:00
Andrew Bartlett
89f6691cdc Add some comments.
(This used to be commit 855fab395f)
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 62f0acc991)
2003-05-05 05:01:59 +00:00
Tim Potter
c4c55a00db Fix some compiler warnings.
(This used to be commit 52d5ff7bda)
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 00e08efb5c)
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 542a8b1817)
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 2fabc35676)
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 9e3d0cd9de)
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 edbab685d1)
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 2e7537d8e2)
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 b5b1732b11)
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 ca2886c938)
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 2557b94519)
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 bb79b127e0)
2003-04-29 09:43:17 +00:00
Tim Potter
90dbd21cd0 Fix compiler warning.
(This used to be commit f127f96425)
2003-04-28 06:19:11 +00:00
Tim Potter
4ea3cd2629 Merge of const fixes from HEAD.
(This used to be commit a847ebd827)
2003-04-28 05:18:30 +00:00
Simo Sorce
43b3ea968b back port from HEAD
(This used to be commit f7cfdf20b7)
2003-04-26 01:15:57 +00:00
Tim Potter
bf3e2980bc Merge of missed another while condition when enumerating aliases.
(This used to be commit ee78196bcf)
2003-04-25 04:09:01 +00:00
Gerald Carter
f4187018ea fix and if () that should be an 'else if()'
(This used to be commit 82f024723c)
2003-04-25 02:26:23 +00:00
Tim Potter
d3ba70356e 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.
(This used to be commit 4998a72cf8)
2003-04-25 02:00:47 +00:00
Gerald Carter
9530bbe2ad groupmap delet should take a name or a SID
(This used to be commit d9277bd064)
2003-04-24 16:47:32 +00:00
Andrew Bartlett
11c453951a More fun with Sun CC needing constant initializers
(This used to be commit ce3dd8fd69)
2003-04-23 13:59:32 +00:00
Andrew Bartlett
327ad645dd Fix up non-constant initialisers for Sun's CC.
Andrew Bartlett
(This used to be commit 82ba1b4d16)
2003-04-23 10:28:56 +00:00
Andrew Bartlett
9265628c20 This const isn't quite vaild C.
Andrew Bartlett
(This used to be commit de96c1aaca)
2003-04-23 09:32:29 +00:00
Gerald Carter
cfe53bd066 allow the unix group in a mapping to be changed; doesn't work with LDAP right now but should be ok with tdb's
(This used to be commit fdacad185c)
2003-04-23 00:34:31 +00:00
Gerald Carter
651ff45e8d don't reset the group type unless specified
(This used to be commit 541f40a144)
2003-04-22 18:03:55 +00:00
Gerald Carter
9465f4b2c4 default new groups to domain groups
(This used to be commit 665d21b865)
2003-04-22 05:57:49 +00:00
Andrew Bartlett
96e1202f23 Fix up bugs in the new 'store sec_channel type' code - we were always joining
as a BDC.

Andrew Bartlett
(This used to be commit f35674e755)
2003-04-22 05:32:01 +00:00
Gerald Carter
cbdb436e21 support referencing group by sid in all operations; allow group name to be changed
(This used to be commit b6ccdb8f7b)
2003-04-22 05:14:21 +00:00
Gerald Carter
3996f116c7 removing some ifdef'd out code
(This used to be commit 43942398af)
2003-04-22 02:52:15 +00:00