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

593 Commits

Author SHA1 Message Date
Gerald Carter
04aff47c71 moving SAM_ACCOUNT to include a bit field for initialized
members (such as uid and gid).  This way we will be able to
keep ourselves from writing out default smb.conf settings when
the admin doesn't want to,  That part is not done yet.

Tested compiles with ldap/tdb/smbpasswd.  Tested connection with smbpasswd
backend.

oh...and smbpasswd doesn'y automatically expire accounts after 21 days
from the last password change either now.  Just ifdef'd out that code
in build_sam_account().

Will merge updates into 2.2 as they are necessary.




jerry
(This used to be commit f0d4379115)
2001-12-27 06:38:04 +00:00
Martin Pool
c5f44afda7 smbcontrol in non-interactive mode was returning True for success --
need to invert this to give the shell 0.
(This used to be commit ecc624067c)
2001-12-21 04:33:28 +00:00
Martin Pool
86fb267fc8 Add option to pass NULL max_replies to wait_for_replies in case you
don't know how many to expect.
(This used to be commit 53f1c0298b)
2001-12-21 04:30:58 +00:00
Martin Pool
e27fbe7075 Add code to send MSG_REQ_POOL_USAGE. (smbd doesn't respond yet.)
Factor out common code to wait until replies are received or timeout
expires.

Show debug message when messages are sent.
(This used to be commit 17bb0f60af)
2001-12-21 04:28:03 +00:00
Andrew Tridgell
91ee73e300 make sure we store the domain sid when joining a ADS domain
(This used to be commit dfbe442c66)
2001-12-20 23:35:53 +00:00
Andrew Tridgell
6722cfc3e6 added net lookup command
(This used to be commit 51268c512d)
2001-12-20 07:42:00 +00:00
Andrew Tridgell
bed11a34ba net now sends its debug to stderr so its output can be relied upon in
scripts
(This used to be commit 6d2f7ed708)
2001-12-20 07:13:47 +00:00
Andrew Tridgell
6c7e9dfb29 net ads password and net ads chostpass commands from Remus Koos
(This used to be commit 412e79c448)
2001-12-20 03:54:52 +00:00
Andrew Tridgell
1f31ace6cb much better ADS error handling system
(This used to be commit 05a90a2884)
2001-12-19 12:21:12 +00:00
Andrew Tridgell
a062e58d9e - added initial support for trusted domains in winbindd_ads
- gss error code patch from a.bokovoy@sam-solutions.net
- better sid dumping in ads_dump
- fixed help in wbinfo
(This used to be commit ee1c3e1f04)
2001-12-19 08:44:23 +00:00
Jeremy Allison
dccc1ed3f8 Fixup JF's weird SID return :-).
Jeremy
(This used to be commit 7b8fb8d85c)
2001-12-18 19:44:14 +00:00
Andrew Tridgell
48c45486e3 allow selection of the organisational unit when joining a realm
(This used to be commit f1231c2b54)
2001-12-17 11:16:22 +00:00
Jean-François Micouleau
21e3bbbea7 Rafal (mimir) patch for trusts r.
(This used to be commit c26623671e)
2001-12-14 14:35:38 +00:00
Tim Potter
f46eb14806 Display a nice error message if the user%password specified for net rpc
join does not have administrator privileges.
(This used to be commit af24b1036c)
2001-12-14 03:55:44 +00:00
Tim Potter
69e0fe9972 Display a nice error message for NT_STATUS_LOGON_FAILURE in connect_to_ipc()
(This used to be commit 60eb4dc7b1)
2001-12-14 03:55:09 +00:00
Jim McDonough
fefd9a9243 More help/messages/formatting cleanup.
(This used to be commit 882e5e3bb8)
2001-12-14 02:45:13 +00:00
Tim Potter
c5564c55fc Merge from 2.2 to allow net rpc join -U to complete even if the workstation
account already exists.

# net rpc join --user=Administrator%password

It's kind of weird seeing the mix of NET.EXE style of options (net command
subcommand /arg:value) with the GNU-style long options.  I think it works.
(This used to be commit 3789c8c707)
2001-12-14 02:17:18 +00:00
Jim McDonough
9f3b884d3f Restoration of at least some help function and format. First round of cleanup. Printq function cannot exactly mimic windows output using d_printf...oh well. Add some more command-specific options back into help.
(This used to be commit e135320e05)
2001-12-14 02:15:04 +00:00
Tim Potter
9f6b241175 Set the debuglevel after the call to lp_load() so the change sticks.
(This used to be commit 3c927e39e7)
2001-12-14 02:14:59 +00:00
Andrew Tridgell
d23723a3e4 don't use -u switch to /bin/date - too many systems don't honor it
(This used to be commit 0839cf03a9)
2001-12-14 01:15:14 +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
Andrew Tridgell
1fb2f3649d added "net ads info" to fetch basic ADS info without any auth
(This used to be commit b107ecef70)
2001-12-13 13:19:20 +00:00
Andrew Tridgell
0ae4916299 improved error message from failed connect
(This used to be commit 4405a87fb7)
2001-12-13 08:54:51 +00:00
Andrew Tridgell
60b53b3f6f added "net time zone" command to show the timezone on a computer
(This used to be commit 4e2691b1c1)
2001-12-12 09:37:17 +00:00
Andrew Tridgell
331fa95b7a allow join of already joined domain
(This used to be commit 784a3f2951)
2001-12-11 12:29:03 +00:00
Andrew Tridgell
3607b3ccab prevent double free
(This used to be commit 3628a978d1)
2001-12-11 10:37:00 +00:00
Andrew Tridgell
6939dd050b better error handling
(This used to be commit 75621d5284)
2001-12-11 05:47:26 +00:00
Andrew Tridgell
e5dbe13b58 added a comment about /bin/date
(This used to be commit 2183c1f3b0)
2001-12-11 05:28:56 +00:00
Andrew Tridgell
32ba2c889f added a net time command. Allow display or set of system time based on
a SMB server

particularly useful for ADS is:

	net time set -S DOMAIN#1B

this makes kerberos clock skew problems go away :)
(This used to be commit b3ba2293d0)
2001-12-11 05:21:50 +00:00
Tim Potter
4589265bb0 Removed unreferenced getopt() externals.
(This used to be commit c87d1ad321)
2001-12-11 04:25:21 +00:00
Andrew Tridgell
0c29881501 reinstated all the rap commands as top level commands until we get the
protocol switch mechanism in place
(This used to be commit d20c3717dd)
2001-12-10 22:25:21 +00:00
Andrew Tridgell
5d378a280f added internal sasl/gssapi code. This means we are no longer dependent on cyrus-sasl which makes the code much less fragile. Also added code to auto-determine the server name or realm
(This used to be commit 435fdf276a)
2001-12-08 11:18:56 +00:00
Andrew Bartlett
8ba00d147b OK. Smbpasswd -j is DEAD.
This moves the rest of the functionality into the 'net rpc join' code.

Futhermore, this moves that entire area over to the libsmb codebase, rather
than the crufty old rpc_client stuff.

I have also fixed up the smbpasswd -a -m bug in the process.

We also have a new 'net rpc changetrustpw' that can be called from a
cron-job to regularly change the trust account password, for sites
that run winbind but not smbd.

With a little more work, we can kill rpc_client from smbd entirly!
(It is mostly the domain auth stuff - which I can rework - and the
spoolss stuff that sombody else will need to look over).

Andrew Bartlett
(This used to be commit 575897e879)
2001-12-05 11:00:26 +00:00
Andrew Tridgell
9421ad4a7a added a REALLY gross hack into kerberos_kinit_password so that
winbindd can do a kinit
this will be removed once we have code that gets a tgt
and puts it in a place where cyrus-sasl can see it
(This used to be commit 7d94f1b736)
2001-12-05 09:46:53 +00:00
Andrew Bartlett
cf90455854 Add a new flag for anonymous connections
(This used to be commit 5a96391c75)
2001-12-05 03:14:35 +00:00
Andrew Bartlett
f98d753b2f Make it easier to construct anonymous connections with a new flag and helper
function.
(This used to be commit 61b0f5f4f9)
2001-12-05 03:14:21 +00:00
Andrew Bartlett
2f87684a1e Split out the name resolution code into a seperate function
(This used to be commit b2443f6fca)
2001-12-05 02:58:40 +00:00
Andrew Bartlett
241a32b436 Follow herb's suggestion and don't strdup a string to itself
(This used to be commit d00f461f43)
2001-12-05 01:59:32 +00:00
Andrew Bartlett
f018400b69 Follow herb's suggestion and don't strdup a string to itself.
(This used to be commit ea76a687fc)
2001-12-05 01:58:33 +00:00
Andrew Bartlett
38d10d2ac1 Add a mechinism to allow for sane porting of rpcclient components into the new
'net' command.

This also gets us 'net rpc user add'.

Andrew Bartlett
(This used to be commit 1197689bc5)
2001-12-05 00:26:36 +00:00
Jean-François Micouleau
922eb763d7 added a boolean to the group mapping functions to specify if we need or
not the privileges. Usually we don't need them, so the memory is free
early.

lib/util_sid.c: added some helper functions to check an SID.

passdb/passdb.c: renamed local_lookup_rid() to local_lookup_sid() and pass
an RID all the way. If the group doesn't exist on the domain SID,
don't return a faked one as it can collide with a builtin one. Some rpc
structures have been badly designed, they return only rids and force the
client to do subsequent lsa_lookup_sid() on the domain sid and the builtin
sid !

rpc_server/srv_util.c: wrote a new version of get_domain_user_groups().
Only the samr code uses it atm. It uses the group mapping code instead of
a bloody hard coded crap. The netlogon code will use it too, but I have to
do some test first.

	J.F.
(This used to be commit 6c87e96149)
2001-12-04 21:53:47 +00:00
Andrew Tridgell
c75ef67f97 allow for passwords other than "samba2"
:)
(This used to be commit cee58f1097)
2001-12-04 06:56:58 +00:00
Andrew Tridgell
1838d83e24 moved init_account_policy() to the right place
(This used to be commit e908f304a2)
2001-12-04 06:20:39 +00:00
Andrew Tridgell
de98a82052 typo fix
(This used to be commit 660238adca)
2001-12-04 06:16:02 +00:00
Andrew Bartlett
a2fbc74f74 smbpasswd is *ugly*!
However this looks like the best spot to init the account policy db...

(fix segfaults on all local smbpasswd ops)

Andrew Bartlett
(This used to be commit 3f3bb62ba6)
2001-12-04 05:16:54 +00:00
Andrew Bartlett
3bc87626ae Add 'net rpc join' to match the ADS equiv.
This kills off the offending code in smbpasswd -j -Uab%c

In the process we have changed from unsing compelatly random passwords
to random, 15 char ascii strings.  While this does produce a decrese in
entropy, it is still vastly greater than we need, considering the application.

In the meantime this allows us to actually *type* the machine account
password duruign debugging.

This code also adds a 'check' step to the join, confirming that the
stored password does indeed do somthing of value :-)

Andrew Bartlett
(This used to be commit c0b7ee6ee5)
2001-12-04 05:03:03 +00:00
Andrew Bartlett
275a9f4ef7 Some changes to the name resolution code in 'net' to allow us to find a
PDC, as well as changes for correctness as per tridge.

Andrew Bartlett
(This used to be commit 16d302c5cc)
2001-12-04 04:48:01 +00:00
Jean-François Micouleau
cdf9b42754 added a tdb to store the account policy informations.
You can change them with either usermanager->policies->account
or from a command prompt on NT/W2K: net accounts /domain

we can add a rpc accounts to the net command. As the net_rpc.c is still
empty, I did not start. How should I add command to it ? Should I take the
rpcclient/cmd_xxx functions and call them from there ?

alse changed the SAM_UNK_INFO_3 parser, it's an NTTIME. This one is more
for jeremy ;-)

        J.F.
(This used to be commit bc28a8eebd)
2001-12-03 17:14:23 +00:00
Andrew Bartlett
3ea7519b06 This change reworkes the connection code for both rpcclient and net new
'net' untility.

This should make it easier to port rpcclient code across to net.

It also allows SPNEGO (the NTLMSSP subsystem in particular) to work, becouse
it kills off the early destruction of the clear-text password.

Andrew Bartlett
(This used to be commit eee925861a)
2001-12-03 07:42:18 +00:00
Andrew Bartlett
8e16021383 Forgot this one with the last commit...
Andrew Bartlett
(This used to be commit 8dbd9702d8)
2001-12-03 06:49:47 +00:00