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

219 Commits

Author SHA1 Message Date
Gerald Carter
0af1500fc0 r13316: Let the carnage begin....
Sync with trunk as off r13315
(This used to be commit 17e63ac4ed)
2007-10-10 11:06:23 -05:00
Derrell Lipman
9c15bd311d r13212: r12414@cabra: derrell | 2006-01-28 17:52:17 -0500
lp_load() could not be called multiple times to modify parameter settings based
 on reading from multiple configuration settings.  Each time, it initialized all
 of the settings back to their defaults before reading the specified
 configuration file.

 This patch adds a parameter to lp_load() specifying whether the settings should
 be initialized.  It does, however, still force the settings to be initialized
 the first time, even if the request was to not initialize them.  (Not doing so
 could wreak havoc due to uninitialized values.)
(This used to be commit f2a24de769)
2007-10-10 11:06:18 -05:00
Simo Sorce
69981e3341 r13148: Fix bug: #3413
Check that ldap admin dn is defined in smb.conf before
setting the ldap password in secrets.tdb

Based on patch by William Jojo <jojowil@hvcc.edu>

Simo.
(This used to be commit c2c004a620)
2007-10-10 11:06:15 -05:00
Volker Lendecke
19563e6744 r12840: Add -W to smbpasswd. Thanks to William Jojo <jojowil@hvcc.edu>.
Volker
(This used to be commit 2942f3594b)
2007-10-10 11:06:04 -05:00
Volker Lendecke
608aa3f41e r12544: Fix segfaults in winbind, smbpasswd and net
(This used to be commit 9ca8edc26e)
2007-10-10 11:05:59 -05:00
Jeremy Allison
9fda3ecda4 r6261: Tidyup message str printf. Ensure tvs struct is zeroed.
Jeremy.
(This used to be commit 6c9f227ef4)
2007-10-10 10:56:33 -05:00
Jeremy Allison
046bea52eb r6256: Fix fprintf errors in smbpasswd. Fix for bug #2585 Ulf Härnhammar <metaur@telia.com>
Jeremy.
(This used to be commit 3dfa6c40fc)
2007-10-10 10:56:32 -05:00
Volker Lendecke
09b49ee92f r3882: Fix bug 2069 -- thanks to jason@ncac.gwu.edu
(This used to be commit 5c9fd4d896)
2007-10-10 10:53:23 -05:00
Jeremy Allison
645d67c377 r1504: Remove insane use of "user password" on the COMMAND LINE !
in smbpasswd. Use -s if you want to script this.
Jeremy.
(This used to be commit a3589a18b6)
2007-10-10 10:52:13 -05:00
Andrew Bartlett
56bd63b1cd I *hate* global variables...
OK, what was happening here was that we would invalidate global_sam_sid
when we set the sid into secrets.tdb, to force a re-read.

The problem was, we would do *two* writes into the TDB, and the second one
(in the PDC/BDC case) would be of a NULL pointer.  This caused smbd startups
to fail, on a blank TDB.

By using a local variable in the pdb_generate_sam_sid() code, we avoid this
particular trap.

I've also added better debugging for the case where this all matters, which
is particularly for LDAP, where it finds out a domain SID from the sambaDomain
object.

Andrew Bartlett
(This used to be commit 86ad04d26d)
2004-02-25 22:01:02 +00:00
Jeremy Allison
aa4abfb3b5 Fix "unable to initialize" bug when smbd hasn't been run with
new system and a user is being added via pdbedit/smbpasswd.
Found at Connectathon setup.
Jeremy.
(This used to be commit f9c7a42e89)
2004-02-23 20:12:31 +00:00
Andrew Bartlett
ccaf0e7fb1 This should be the correct fix for the lack of a prototype for
remote_password_change().

Sorry for the original bug.

Andrew Bartlett
(This used to be commit 955436a6f6)
2004-02-04 11:12:25 +00:00
Gerald Carter
7ca6d16605 fix problems with proto.h
(This used to be commit 5a32f9568f)
2004-02-02 20:16:24 +00:00
Gerald Carter
19cc1a9f20 remerge andrew's cracklib patch from HEAD and fix a compile warnings
(This used to be commit b60f6ec30d)
2004-02-02 00:08:35 +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
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
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
816724fb39 more compile fixes for become/unbecome_root()
(This used to be commit f005f1cf12)
2003-07-09 03:32:07 +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
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
634c54310c Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
(This used to be commit 3a7458f947)
2003-01-03 08:28:12 +00:00
Gerald Carter
438c460cec merge of smbpasswd segfault from SAMBA_2_2
(This used to be commit b17af40b1c)
2002-12-12 20:50:31 +00:00
Jeremy Allison
2f194322d4 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
(This used to be commit f755711df8)
2002-11-12 23:20:50 +00:00
Andrew Bartlett
c19598f2a6 Merge from HEAD:
- change auth_sam to use the initialisation flags to determine if
	 the password attributes are set

 - add const to secrets.c, cliconnect.c

 - passdb:  fix spelling in pdb_ldap, add group mapping back to smbpasswd

 - SAMR: add debugs to show what fails for group enum.

Andrew Bartlett
(This used to be commit 4e74d00b36)
2002-11-08 23:08:59 +00:00
Gerald Carter
a834a73e34 sync'ing up for 3.0alpha20 release
(This used to be commit 65e7b5273b)
2002-09-25 15:19:00 +00:00
Jelmer Vernooij
f0255b38bc sync 3.0 branch with HEAD
(This used to be commit 1b83b78e33)
2002-08-17 14:45:04 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb)
2002-07-15 10:35:28 +00:00
Herb Lewis
62ad2d800e reorder useage message a little. -L is not a root-only or local mode option.
(This used to be commit 020d6fa2f7)
2002-04-03 16:44:15 +00:00
Herb Lewis
105d1301d5 readd -c config file change from 2.2 - works with -L mode now as well.
(This used to be commit af4c3734b5)
2002-04-02 06:18:13 +00:00
Andrew Tridgell
3ce3047154 reverted Herbs smbpasswd commit as it completely broke setting a
password
(This used to be commit a5807d5784)
2002-04-01 02:04:11 +00:00
Herb Lewis
92a0f7949f merge from 2.2 - allow -c option to specify smb.conf file
(This used to be commit fc15b56d29)
2002-03-30 05:57:36 +00:00
Herb Lewis
a2819db2f0 merge from 2.2 - don't check local passdb if -r option used
(This used to be commit 15df51e8de)
2002-03-27 19:20:48 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Andrew Bartlett
1a74d8d1f0 This is another *BIG* change...
Samba now features a pluggable passdb interface, along the same lines as the
one in use in the auth subsystem.  In this case, only one backend may be active
at a time by the 'normal' interface, and only one backend per passdb_context is
permitted outside that.

This pluggable interface is designed to allow any number of passdb backends to
be compiled in, with the selection at runtime.  The 'passdb backend' paramater
has been created (and documented!) to support this.

As such, configure has been modfied to allow (for example) --with-ldap and the
old smbpasswd to be selected at the same time.

This patch also introduces two new backends:  smbpasswd_nua and tdbsam_nua.
These two backends accept 'non unix accounts', where the user does *not* exist
in /etc/passwd.  These accounts' don't have UIDs in the unix sense, but to
avoid conflicts in the algroitmic mapping of RIDs, they use the values
specified in the 'non unix account range' paramter - in the same way as the
winbind ranges are specifed.

While I was at it, I cleaned up some of the code in pdb_tdb (code copied
directly from smbpasswd and not really considered properly).  Most of this was
to do with % macro expansion on stored data.  It isn't easy to get the macros
into the tdb, and the first password change will 'expand' them.  tdbsam needs
to use a similar system to pdb_ldap in this regard.

This patch only makes minor adjustments to pdb_nisplus and pdb_ldap, becouse I
don't have the test facilities for these.  I plan to incoroprate at least
pdb_ldap into this scheme after consultation with Jerry.

Each (converted) passdb module now no longer has any 'static' variables, and
only exports 1 init function outside its .c file.

The non-unix-account support in this patch has been proven!  It is now possible
to join a win2k machine to a Samba PDC without an account in /etc/passwd!

Other changes:

Minor interface adjustments:
pdb_delete_sam_account() now takes a SAM_ACCOUNT, not a char*.

pdb_update_sam_account() no longer takes the 'override' argument that was being
ignored so often (every other passdb backend).  Extra checks have been added in
some places.

Minor code changes:
smbpasswd no longer attempts to initialise the passdb at startup, this is
now done on first use.

pdbedit has lost some of its 'machine account' logic, as this behaviour is now
controlled by the passdb subsystem directly.

The samr subsystem no longer calls 'local password change', but does the pdb
interactions directly.  This allow the ACB_ flags specifed to be transferred
direct to the backend, without interference.

Doco:

I've updated the doco to reflect some of the changes, and removed some paramters
no longer applicable to HEAD.
(This used to be commit ff354c99c5)
2002-01-20 14:30:58 +00:00
Herb Lewis
f1256e847e merge changes from 2.2 branch to prevent smb.conf from changing debug level
of commands when specified on command line.
(This used to be commit 39d6b31e14)
2002-01-07 21:32:22 +00:00
Gerald Carter
bff833e76a sync getopt() args with 2.2
(This used to be commit 2fcdc520ce)
2002-01-07 14:17:49 +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
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 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
1838d83e24 moved init_account_policy() to the right place
(This used to be commit e908f304a2)
2001-12-04 06:20:39 +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
Tim Potter
79b34d1b11 Removed TimeInit() call from every client program (except for one place
in smbd/process.c where the timezone is reinitialised.  Was replaced with
check for a static is_initialised boolean.
(This used to be commit 8fc772c9e5)
2001-11-23 00:52:29 +00:00
Martin Pool
5b1fb34731 Rename xmalloc, xmemdup, xstrdup to smb_$1 to avoid conflicts with the
versions defined by libreadline on SCO (!).
(This used to be commit 32480d7aff)
2001-11-20 06:38:09 +00:00
Martin Pool
59b852fd72 Make the smbpasswd options/usage message a little less bizarre: it now
shows all the available options, but explains that you must be root to
use them.  Surely this is less confusing?
(This used to be commit 19f5f81399)
2001-11-19 08:12:06 +00:00
Martin Pool
f741f65673 Store some path names in global variables initialized to configure
default, rather than in preprocessor macros.
(This used to be commit 79ec88f0da)
2001-11-19 02:49:53 +00:00
Andrew Bartlett
2fc8e32ad3 Parionia to ensure people don't install libsmb based programs setuid root.
libsmb has not been written to be setuid, with things like LIBSMB_PROG allowing
all sort of fun and games.

Andrew Bartlett
(This used to be commit 0c8e9339d8)
2001-10-31 01:52:34 +00:00
Andrew Bartlett
15741d2fe4 Fix up smbpasswd -e/-d so that it doesn't change the password under you any
more.

(Previously it set them to 'XXXX' or similar when only the flags were being
changed - a bug I must have introduced when I reworked the passdb end of things
a few weeks back.)

Adds a new local flag:  LOCAL_SET_PASSWORD to specify that the password is
actually to be changed.

Andrew Bartlett
(This used to be commit cea6b6cb22)
2001-10-30 05:21:16 +00:00
Jeremy Allison
c032c2b364 Added xstrdup, removed static version from smbpasswd.c
Jeremy.
(This used to be commit d01a9e5974)
2001-10-22 02:38:45 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Andrew Bartlett
81697d5ebe Fix up a number of intertwined issues:
The big one is a global change to allow us to NULLify the free'ed pointer to a
former passdb object.  This was done to allow idra's SAFE_FREE() macro to do
its magic, and to satisfy the input test in pdb_init_sam() for a NULL pointer
to start with.

This NULL pointer test was what was breaking the adding of accounts up until
now, and this code has been reworked to avoid duplicating work - I hope this
will avoid a similar mess-up in future.

Finally, I fixed a few nasty bugs where the pdb_ fuctions's return codes were
being ignored.  Some of these functions malloc() and are permitted to fail.
Also, this caught a nasty bug where pdb_set_lanman_password(sam, NULL) acheived
precisely didilly-squat, just returning False.  Now that we check the returns
this bug was spotted.  This could allow different LM and NT passwords.

 - the pdbedit code needs to start checking these too, but I havn't had a
chance to fix it.

I have also fixed up where some of the password changing code was using the
pdb_set functions to store *internal* data.  I assume this is from a previous
lot of mass conversion work...

Most likally (and going on past experience) I have missed somthing, probably in
the LanMan password change code which I havn't yet been able to test, but this
lot is in much better shape than it was before.

If all this is too much to swallow (particularly for 2.2.2) then just adding a
sam_pass = NULL to the particular line of passdb.c should do the trick for the
ovbious bug.

Andrew Bartlett
(This used to be commit 762c8758a7)
2001-09-29 13:08:26 +00:00
Simo Sorce
c0ef0e113e move to SAFE_FREE()
(This used to be commit 67db8f03c5)
2001-09-17 11:48:29 +00:00
Jeremy Allison
31e8101ea2 Fixed problems with arg parsing as root with smbpasswd.
Jeremy.
(This used to be commit 6399cf490d)
2001-09-12 20:00:42 +00:00
Andrew Tridgell
19fea3242c the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but the client code still needs some work
(This used to be commit dcd6e735f7)
2001-09-04 07:13:01 +00:00
Tim Potter
d01c23680a Set acb_info to ACB_SVRTRUST if we are joining the domain as a BDC without
going through the server manager.
(This used to be commit 52f5abae46)
2001-08-31 05:48:37 +00:00
Gerald Carter
aca0710066 merge from 2.2
(This used to be commit d31e1b63b5)
2001-08-30 05:54:41 +00:00
Tim Potter
b3e43e047b Fix uninitialised variables. Spotted by "Esh, Andrew" <AEsh@tricord.com>
(This used to be commit 9081af4fe5)
2001-08-29 22:47:59 +00:00
Andrew Tridgell
b031af348c converted another bunch of stuff to NTSTATUS
(This used to be commit 1d36250e33)
2001-08-27 19:46:22 +00:00
Herb Lewis
717533483b get rid of compiler warnings
(This used to be commit 0768991d04)
2001-08-24 20:32:01 +00:00
Jeremy Allison
65bf96ed06 Allow smbpasswd to join a W2K hosted AD domain.
Jeremy.
(This used to be commit c51cfc7f0d)
2001-08-02 23:48:51 +00:00
Tim Potter
648528196c Held a shoot-out between NT_STATUS_NO_PROBLEMO and NT_STATUS_NOPROBLEMO.
According to the incorruptible judges find and grep, the latter won.

Mmm - procrastination.  (-:
(This used to be commit 2e33940360)
2001-07-25 06:42:05 +00:00
Jeremy Allison
da9fb5ba38 Don't try and open tdb secrets file in non-root/local mode.
Jeremy.
(This used to be commit e78a114425)
2001-07-06 21:53:32 +00:00
Andrew Tridgell
527e824293 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn.
(This used to be commit c41fc06376)
2001-07-04 07:36:09 +00:00
Andrew Tridgell
87fbb7092b The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
(This used to be commit debb471267)
2001-07-04 07:15:53 +00:00
Tim Potter
d90f7ef5ea Experimental support for joining a domain without creating an account in
server manager first.  Just use the -U parameter to smbpasswd when joining
the domain:

	smbpasswd -r PDC -j DOMAIN -U administrator%password

Should also work with domain users with the 'add workstation to domain'
user right.
(This used to be commit 937b96feaa)
2001-06-29 08:04:12 +00:00
Andrew Tridgell
53ca6d33ce added a -L option to smbpasswd to force it to run locally so we can test smbpasswd as non-root
(This used to be commit ab63520265)
2001-06-25 01:15:17 +00:00
Gerald Carter
30c4c04c2f Patch from Simo:
o sed 's/pdb_clear_sam/pdb_free_sam/g'
  o add pdb_reset_sam()
  o password changing should be ok now as well.
(This used to be commit 96d0e7c330)
2001-05-07 14:04:46 +00:00
Jean-François Micouleau
f35157f392 Big cleanup of passdb and backends.
I did some basic tests but I have probably broken something. Notably the
password changing. So don't cry ;-)

	J.F.
(This used to be commit a4a4c02b12)
2001-05-04 15:44:27 +00:00
Herb Lewis
55d0bdbf4a fix typo
(This used to be commit ed2dfae0e5)
2001-04-24 18:53:15 +00:00
Herb Lewis
57007050da don't allow both add and delete user to be set at the same time
(This used to be commit 9db84de46a)
2001-04-24 16:44:28 +00:00
Jeremy Allison
da3053048c Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMR
RPC code to merge with new passdb code.
Currently rpcclient doesn't compile. I'm working on it...
Jeremy.
(This used to be commit 0be41d5158)
2001-03-11 00:32:10 +00:00
Andrew Tridgell
7fb8d5a00b fixed a crash bug in smbpasswd
(the user can come from optarg, so we can't free it)
(This used to be commit 56ffb58eff)
2001-02-21 04:13:47 +00:00
David O'Neill
ea1e6f9e7b Changes from APPLIANCE_HEAD:
source/lib/smbpasswd.c
        - Only call load_interfaces() when doing a network related
          operation.  This means you can add, remove, enable or disable
          smbpasswd entries without a network.  Changing passwords always
          requires a network.
(This used to be commit e2193c3a36)
2001-01-11 23:21:17 +00:00
Gerald Carter
9fede0dc0d Large commit which restructures the local password storage API.
Currently the only backend which works is smbpasswd (tdb, LDAP, and NIS+)
are broken, but they were somewhat broken before. :)

The following functions implement the storage manipulation interface

/*The following definitions come from  passdb/pdb_smbpasswd.c  */

BOOL pdb_setsampwent (BOOL update);
void pdb_endsampwent (void);
SAM_ACCOUNT* pdb_getsampwent (void);
SAM_ACCOUNT* pdb_getsampwnam (char *username);
SAM_ACCOUNT* pdb_getsampwuid (uid_t uid);
SAM_ACCOUNT* pdb_getsampwrid (uint32 rid);
BOOL pdb_add_sam_account (SAM_ACCOUNT *sampass);
BOOL pdb_update_sam_account (SAM_ACCOUNT *sampass, BOOL override);
BOOL pdb_delete_sam_account (char* username);

There is also a host of pdb_set..() and pdb_get..() functions for
manipulating SAM_ACCOUNT struct members.  Note that the struct
passdb_ops {} has gone away.  Also notice that struct smb_passwd
(formally in smb.h) has been moved to passdb/pdb_smbpasswd.c
and is not accessed outisde of static internal functions in this
file.  All local password searches should make use of the the SAM_ACCOUNT
struct and the previously mentioned functions.

I'll write some documentation for this later.  The next step is to fix
the TDB passdb backend, then work on spliting the backends out into
share libraries, and finally get the LDAP backend going.

What works and may not:

	o domain logons from Win9x 	works
	o domain logons from WinNT 4	works
	o user and group enumeration
		as implemented by Tim	works
	o file and print access		works
	o changing password from
		Win9x & NT		ummm...i'll fix this tonight :)

If I broke anything else, just yell and I'll fix it.  I think it
should be fairly quite.





-- jerry
(This used to be commit 0b92d0838e)
2000-11-13 23:03:34 +00:00
Jeremy Allison
d8ad8a0d74 Fix for safe_free freeing static strings. From Robert August Vincent, II.
Jeremy.
(This used to be commit bd844fcd30)
2000-08-21 19:30:19 +00:00
Tim Potter
18db0514fd Fixed memory leaks in root and non-root password changing.
(This used to be commit f3a4f81a5e)
2000-07-26 03:55:17 +00:00
Andrew Tridgell
cbeb0aa3f2 moved secrets fns into secrets.c
(This used to be commit 16355a9c66)
2000-06-03 06:34:40 +00:00
Andrew Tridgell
2958dfcdf8 added secrets.tdb and changed storage of trust account password to use
it
(This used to be commit 88ad00b82a)
2000-05-08 10:42:21 +00:00
Jeremy Allison
50444a0b5f Fixed smbpasswd crash bugs found by Giulio.
Jeremy.
(This used to be commit 54440428e5)
2000-03-01 18:58:50 +00:00
Jeremy Allison
0f1eee5c7a client/client.c:
libsmb/clientgen.c: Fixes for Win2k smbclient browsing.
Other fixes implement smbpasswd -x user to delete users. Also allows swat
to do the same.
Jeremy.
(This used to be commit 9f6ad04676)
2000-02-25 22:25:25 +00:00
Andrew Tridgell
3db52feb1f first pass at updating head branch to be to be the same as the SAMBA_2_0 branch
(This used to be commit 453a822a76)
1999-12-13 13:27:58 +00:00
Luke Leighton
4f8a24522c final part of "first" phase converting over to msrpc daemon architecture.
done a minimal amout of clean-up in the Makefile, removing unnecessary
modules from the link stage.  this is not complete, yet, and will
involve some changes, for example to smbd, to remove dependencies on
the password database API that shouldn't be there.  for example,
smbd should not ever call getsmbpwXXX() it should call the Samr or Lsa
API.

this first implementation has minor problems with not reinstantiating
the same services as the caller.  the "homes" service is a good example.
(This used to be commit caa5052522)
1999-12-12 20:03:42 +00:00
Gerald Carter
12ca139d5c OK. This code works on a RedHat 6.0 system. However smbpasswd
time out of sending the session setup on Solaris 2.6.  No idea.
I'll work on it some tomorrow.  This is to fix the "Unable to
setup password vectors" thingy.

Also changed an inet_aton() to inet_addr() as the former is
not very portable :-)

Luke,  I set the redir flag to false because the connection to
the smb-agent was failing and smbpasswd bombed.  Double check me
on this one.



-jc
(This used to be commit e1d2b174ca)
1999-12-09 07:06:12 +00:00
Luke Leighton
86ac6fa938 fixing joining to domain plus something weird going down with nt logins...
(This used to be commit cef258f1c9)
1999-12-01 19:25:51 +00:00
Luke Leighton
27b8df4d9b attempting to establish inter-domain trust relationships. modified
smbpasswd so it can be used to set up inter-domain trust account.
(This used to be commit 99ec0620c3)
1999-11-20 21:59:16 +00:00
Matthew Chapman
8f54fdb01a BDC support.
Added -S (Synchronise) option to smbpasswd, which calls synchronise_passdb.
(This used to be commit 21c92d2497)
1999-07-22 10:55:41 +00:00
Luke Leighton
6a5a4e8186 BDC support.
(This used to be commit 2331aa32ab)
1999-07-21 00:32:09 +00:00
Matthew Chapman
a1d6f07e54 Mainly BDC-related changes.
* Added SEC_CHAN_BDC
* Added -b switch to smbpasswd (for a BDC (server) trust account).
* Propagate sec_chan into the various functions which change trust account
  passwords, so they can be used for domain control and inter-domain
  trusts.
(This used to be commit 6f2b37bfc5)
1999-04-08 05:37:15 +00:00
Luke Leighton
fda194255c Beau Kuiper: provided patch so that passwords could only be changed by
root if the ACB_PWLOCK bit is set (on a per-user basis).  he also added
an extra smbpasswd option so that this bit can be modified from
command-line.
(This used to be commit 534fe319d9)
1999-03-19 05:00:39 +00:00
Luke Leighton
a3c6e96a22 mods to allow inter-domain trust accounts to be added to SAM database
using smbpasswd command.
(This used to be commit 62d499f832)
1999-03-09 01:21:57 +00:00
Matthew Chapman
e10503d1a2 Added load_interfaces in smbpasswd to allow name resolution by broadcast and
multiple interfaces. (Jeremy already committed this in SAMBA_2_0).
(This used to be commit f530e289c6)
1999-01-18 01:32:45 +00:00
Luke Leighton
04e382fb16 rpc_samr.h parse_samr.c srv_samr.c :
samr_query_aliasmembers (cool!)

util_pwdb.c sids.c nmbd.c server.c smbpasswd.c swat.c :

	pwdb_initialise(BOOL is_server) now creates / reads DOMAIN_NAME.SID
	if is_server is True, and does LsaQueryInfoPolicy(levels 3 and 5)
	to obtain member and pdc sids.
(This used to be commit 3e1eb4f26b)
1998-12-01 19:10:44 +00:00
Luke Leighton
dc879e9ca7 pwdb_initialise() in the wrong place: must load smb.conf first. thanks phil.
(This used to be commit 4b5bd4e18c)
1998-11-30 19:29:32 +00:00
Luke Leighton
30038de462 weekend work. user / group database API.
- split sam_passwd and smb_passwd into separate higher-order function tables

- renamed struct smb_passwd's "smb_user" to "unix_user".  added "nt_user"
plus user_rid, and added a "wrap" function in both sam_passwd and smb_passwd
password databases to fill in the blank entries that are not obtained
from whatever password database API instance is being used.

NOTE: whenever a struct smb_passwd or struct sam_passwd is used, it MUST
be initialised with pwdb_sam_init() or pwd_smb_init(), see chgpasswd.c
for the only example outside of the password database APIs i could find.

- added query_useraliases code to rpcclient.

- dealt with some nasty interdependencies involving non-smbd programs
and the password database API.  this is still not satisfactorily
resolved completelely, but it's the best i can do for now.

- #ifdef'd out some password database options so that people don't
mistakenly set them unless they recompile to _use_ those options.

lots of debugging done, it's still not finished.  the unix/NT uid/gid
and user-rid/group-rid issues are better, but not perfect.  the "BUILTIN"
domain is still missing: users cannot be added to "BUILTIN" groups yet,
as we only have an "alias" db API and a "group" db API but not "builtin-alias"
db API...
(This used to be commit 5d5d7e4de7)
1998-11-29 20:03:33 +00:00
Jeremy Allison
9579b98237 Added OSF1 changes to HEAD (-lsecurity etc.)
groupdb/groupdb.c: Fixed compile error caught by IRIX compiler.
utils/smbpasswd.c: Fixed SunOS optind, optarg problem.
Jeremy.
(This used to be commit 30af39ae1e)
1998-11-18 22:04:24 +00:00
Luke Leighton
74d539f557 - group database API. oops and oh dear, the threat has been carried out:
the pre-alpha "domain group" etc parameters have disappeared.

- interactive debug detection

- re-added mem_man (andrew's memory management, detects memory corruption)

- american spellings of "initialise" replaced with english spelling of
  "initialise".

- started on "lookup_name()" and "lookup_sid()" functions.  proper ones.

- moved lots of functions around.  created some modules of commonly used
  code.  e.g the password file locking code, which is used in groupfile.c
  and aliasfile.c and smbpass.c

- moved RID_TYPE_MASK up another bit.  this is really unfortunate, but
  there is no other "fast" way to identify users from groups from aliases.
  i do not believe that this code saves us anything (the multipliers)
  and puts us at a disadvantage (reduces the useable rid space).
  the designers of NT aren't silly: if they can get away with a user-
  interface-speed LsaLookupNames / LsaLookupSids, then so can we.  i
  spoke with isaac at the cifs conference, the only time for example that
  they do a security context check is on file create.  certainly not on
  individual file reads / writes, which would drastically hit their
  performance and ours, too.

- renamed myworkgroup to global_sam_name, amongst other things, when used
  in the rpc code.  there is also a global_member_name, as we are always
  responsible for a SAM database, the scope of which is limited by the role
  of the machine (e.g if a member of a workgroup, your SAM is for _local_
  logins only, and its name is the name of your server.  you even still
  have a SID.  see LsaQueryInfoPolicy, levels 3 and 5).

- updated functionality of groupname.c to be able to cope with names
  like DOMAIN\group and SERVER\alias.  used this code to be able to
  do aliases as well as groups.  this code may actually be better
  off being used in username mapping, too.

- created a connect to serverlist function in clientgen.c and used it
  in password.c

- initialisation in server.c depends on the role of the server.  well,
  it does now.

- rpctorture.  smbtorture.  EXERCISE EXTREME CAUTION.
(This used to be commit 0d21e1e609)
1998-11-17 16:19:04 +00:00
Jeremy Allison
f4447df41b Added fixes for machine accounts.
Jeremy.
(This used to be commit 7aa644c2f9)
1998-11-16 20:19:57 +00:00
Andrew Tridgell
2db96e3047 fixes for OSF1 compilation
(This used to be commit 5be3c37f50)
1998-11-13 03:37:01 +00:00