summaryrefslogtreecommitdiffstats
path: root/source3/utils/smbpasswd.c
Commit message (Collapse)AuthorAgeFilesLines
* s3:smbpasswd: use lp_load_global()Michael Adam2011-07-281-1/+1
|
* s3-utils Set dyn_CONFIGFILE from -c on smbpasswd command lineAndrew Bartlett2011-05-081-0/+1
| | | | | | | | This is similar to the code in popt_common and allows the smb.conf to be re-loaded from this file later in the code (or for Samba4 plugins to attempt to parse the same smb.conf). Andrew Bartlett
* Fix warning messages caused by addition of null check in fstrcpy macro.Jeremy Allison2011-05-041-2/+2
|
* s3-passdb: add passdb.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-includes: only include system/passwd.h when needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* lib/util/util_pw: share more code between lib/util/util_pw.c and ↵Günther Deschner2011-03-301-0/+1
| | | | | | source3/lib/username.c Guenther
* s3-debug Remove last direct assignements to DEBUGLEVELAndrew Bartlett2010-11-021-1/+1
| | | | | | | | All future assignments of the debug level should go via lp_set_cmdline("log level", "x") because this will ensure the value is not overwritten in an smb.conf load. Andrew Bartlett
* s3-debug Remove 'AllowDebugChange' and use lp_set_cmdline() insteadAndrew Bartlett2010-11-021-4/+0
| | | | | | | | | By removing this global variable, the API between the two different debug systems is made more similar. Both s3 and s4 now have lp_set_cmdline() which ensures that the smb.conf cannot overwrite these the user-specified log level. Andrew Bartlett
* s3-debug Impove setup_logging() to specify logging to stderrAndrew Bartlett2010-11-021-1/+1
| | | | | | | | This change improves the setup_logging() API so that callers which wish to set up logging to stderr can simply ask for it, rather than directly modify the dbf global variable. Andrew Bartlett
* s3: Remove talloc_autofree_context() from smbpasswdVolker Lendecke2010-09-261-2/+2
| | | | In both cases, pwd is freed immediately
* s3-passdb: include samr.h where needed.Günther Deschner2010-08-061-0/+1
| | | | Guenther
* s3-secrets: only include secrets.h when needed.Günther Deschner2010-08-051-0/+1
| | | | Guenther
* Fix coverity #900. Resource leak.Jeremy Allison2009-06-191-0/+5
| | | | Jeremy.
* Consolidate user create/delete paths in smbpasswdSimo Sorce2009-05-291-27/+15
| | | | | | | | | | | | This patch changes the way smbpasswd behaves when adding/deleting users. smbpasswd now calls pdb_create_user/pdb_delete_user, this means that if add/delete user scripts are configured then they are used to create or delete unix users as well. If the scripts are not defined the behavioris unchanged. This also allow to use smbpasswd -a/-x with ldapsam:editposix to allow automatic creation/deletion of users. Signed-off-by: Günther Deschner <gd@samba.org>
* Don't look up local user for remote changes, even when root.Jim McDonough2009-04-161-6/+10
|
* Minor tidyup of unix account missing code.Jeremy Allison2009-01-091-5/+5
| | | | Jeremy.
* s3/smbpasswd: Check if Unix account exists before asking for the password.Karolin Seeger2009-01-091-0/+9
| | | | | | | Admins shouldn't have to type in the password twice when the passdb account cannot be created because the Unix account is missing. Karolin
* Make us clean under valgrind --leak-check=full by using ↵Jeremy Allison2008-11-061-2/+2
| | | | | | | | | | talloc_autofree_context() instead of NULL. Remove the code in memcache that does a TALLOC_FREE on stored pointers. That's a disaster waiting to happen. If you're storing talloc'ed pointers, you can't know their lifecycle and they should be deleted when their parent context is deleted, so freeing them at some arbitrary point later will be a double-free. Jeremy.
* Fix some nonempty blank linesVolker Lendecke2008-09-011-21/+21
| | | | (This used to be commit 9336cd1c5e5b5d113cd4912d4479dfe609fe261e)
* Developer doesn't cut it - need #define test for NSS_WRAPPER.Jeremy Allison2007-12-121-1/+1
| | | | | | Hopefully this should fix the buildfarm. Jeremy. (This used to be commit 087489b7f2a8cd5868b54dbed3f3eed5d0709ba7)
* Only add the non-root escape on !developer.Jeremy Allison2007-12-121-1/+1
| | | | | Jeremy. (This used to be commit a50c2d159c754c6ff88649ed859f2b3f9c24f6a1)
* Fix the buildfarm until I figure out how to allowJeremy Allison2007-12-121-0/+2
| | | | | | smbpasswd -L for non-root on the buildfarm only. Jeremy. (This used to be commit 1bb5ce824f800d967e2a92e946dd6ce7c4580b93)
* Fix bug #3727 with patch from Steve Langasek <vorlon@debian.org>Jeremy Allison2007-12-121-0/+4
| | | | | Jeremy. (This used to be commit 0723760ba47a465d2ff5a22a680f1b5196eca7d8)
* Remove the char[1024] strings from dynconfig. ReplaceJeremy Allison2007-12-101-1/+1
| | | | | | | them with malloc'ing accessor functions. Should save a lot of static space :-). Jeremy. (This used to be commit 52dc5eaef2106015b3a8b659e818bdb15ad94b05)
* Getting to the home stretch for elimination of pstrings...Jeremy Allison2007-12-031-4/+3
| | | | | Jeremy. (This used to be commit 041163551194102ca67fef52c57d87020a1d09bc)
* Make remote_password_change return malloced error stringsVolker Lendecke2007-11-231-2/+3
| | | | | This fixes a segfault in smbpasswd -r (This used to be commit 49949f0b85007c7c2b3c340c12f3d18909862135)
* Remove pstrings from pam_smbpass - make local_password_changeJeremy Allison2007-11-211-5/+7
| | | | | | return malloced strings. Jeremy. (This used to be commit f652fe2bdb7a3a36e83dcf4b08347543fdffb9f0)
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-5/+5
| | | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
* r24943: Some stackframesVolker Lendecke2007-10-101-1/+5
| | | | (This used to be commit cddb9f11d5fafcd3797cb242775c37f0c04d4f15)
* r23801: The FSF has moved around a lot. This fixes their Mass Ave address.Andrew Tridgell2007-10-101-2/+1
| | | | (This used to be commit 87c91e4362c51819032bfbebbb273c52e203b227)
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | | Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
* r22071: Make the error message for incorrect use of '-c' show the parameter ↵Andrew Bartlett2007-10-101-1/+1
| | | | | | | | | | | as used. This means that smbpasswd -c user (which in htpasswd creates a new file) and smbpasswd -c /not/my/smb.conf should give errors an admin will think to chase down. Andrew Bartlett (This used to be commit 721375e14cfcef88061c9e4d4a1f3ca2f33fa9aa)
* r21784: Replace smb_register_idle_event() with event_add_timed(). This fixes ↵Volker Lendecke2007-10-101-1/+1
| | | | | | | | | winbind who did not run the idle events to drop ldap connections. Volker (This used to be commit af3308ce5a21220ff4c510de356dbaa6cf9ff997)
* r16247: Fix Coverity ID 296Volker Lendecke2007-10-101-1/+1
| | | | (This used to be commit b82c95cb438b57bb8910e26657f8ffb590fe02df)
* r16241: Fix Klocwork #106 and others like it.Jeremy Allison2007-10-101-8/+25
| | | | | | | | | | | | | | | Make 2 important changes. pdb_get_methods() returning NULL is a *fatal* error. Don't try and cope with it just call smb_panic. This removes a *lot* of pointless "if (!pdb)" handling code. Secondly, ensure that if samu_init() fails we *always* back out of a function. That way we are never in a situation where the pdb_XXX() functions need to start with a "if (sampass)" test - this was just bad design, not defensive programming. Jeremy. (This used to be commit a0d368197d6ae6777b7c2c3c6e970ab8ae7ca2ae)
* r15906: smbpasswd help text for -W option (patch from Aruna Prabakar ↵Gerald Carter2007-10-101-0/+1
| | | | | | <aruna.prabakar@hp.com> (This used to be commit 0a81af4fef5b794fea257d9e3e11b16c3a4de12f)
* r15311: look at the NT password (not lanman one) when determining if ↵Gerald Carter2007-10-101-1/+1
| | | | | | smbpasswd -e should probably for a password (This used to be commit 3522b53aecb5293747b66250279417f9edf876f1)
* r13590: * replace all pdb_init_sam[_talloc]() calls with samu_new()Gerald Carter2007-10-101-2/+2
| | | | | * replace all pdb_{init,fill}_sam_pw() calls with samu_set_unix() (This used to be commit 6f1afa4acc93a07d0ee9940822d7715acaae634f)
* r13576: This is the beginnings of moving the SAM_ACCOUNT data structureGerald Carter2007-10-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | to make full use of the new talloc() interface. Discussed with Volker and Jeremy. * remove the internal mem_ctx and simply use the talloc() structure as the context. * replace the internal free_fn() with a talloc_destructor() function * remove the unnecessary private nested structure * rename SAM_ACCOUNT to 'struct samu' to indicate the current an upcoming changes. Groups will most likely be replaced with a 'struct samg' in the future. Note that there are now passbd API changes. And for the most part, the wrapper functions remain the same. While this code has been tested on tdb and ldap based Samba PDC's as well as Samba member servers, there are probably still some bugs. The code also needs more testing under valgrind to ensure it's not leaking memory. But it's a start...... (This used to be commit 19b7593972480540283c5bf02c02e5ecd8d2c3f0)
* r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()Gerald Carter2007-10-101-2/+2
| | | | | macro which sets the freed pointer to NULL. (This used to be commit b65be8874a2efe5a4b167448960a4fcf6bd995e2)
* r13524: Add -t|--password-from-stdin option to pdbedit as we had with Samba 2.2.Lars Müller2007-10-101-42/+0
| | | | | | | | | | | This fixes bug #1386. The initial changes had been made by Carsten Höger <choeger at open-xhange dot com> for Samba 2.2 while being at SuSE. *sigh* To not duplicate code from smbpasswd in pdbedit stdin_new_passwd() and get_pass() are moved from smbpasswd to utils/passwd_util.c. (This used to be commit dbdc5ba497c6010dbad47c9d77fc8bec5557a328)
* r13316: Let the carnage begin....Gerald Carter2007-10-101-10/+14
| | | | | Sync with trunk as off r13315 (This used to be commit 17e63ac4ed8325c0d44fe62b2442449f3298559f)
* r13212: r12414@cabra: derrell | 2006-01-28 17:52:17 -0500Derrell Lipman2007-10-101-1/+1
| | | | | | | | | | | | | 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 f2a24de769d1b2266e576597c57a8e3b1e2a2b51)
* r13148: Fix bug: #3413Simo Sorce2007-10-101-3/+9
| | | | | | | | | | 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 c2c004a620ecbd895786dc6f16fb6a616f354a0a)
* r12840: Add -W to smbpasswd. Thanks to William Jojo <jojowil@hvcc.edu>.Volker Lendecke2007-10-101-1/+9
| | | | | Volker (This used to be commit 2942f3594ba39748dca0238f1e1a5c744a7afffb)
* r12544: Fix segfaults in winbind, smbpasswd and netVolker Lendecke2007-10-101-0/+2
| | | | (This used to be commit 9ca8edc26e66887d6333943bc6a9776352c657fc)
* r6261: Tidyup message str printf. Ensure tvs struct is zeroed.Jeremy Allison2007-10-101-1/+1
| | | | | Jeremy. (This used to be commit 6c9f227ef400f32def85268f411691b569d29889)
* r6256: Fix fprintf errors in smbpasswd. Fix for bug #2585 Ulf Härnhammar ↵Jeremy Allison2007-10-101-3/+3
| | | | | | | <metaur@telia.com> Jeremy. (This used to be commit 3dfa6c40fc726ddf38d4cfc6e0604ceed0035d18)
* r3882: Fix bug 2069 -- thanks to jason@ncac.gwu.eduVolker Lendecke2007-10-101-1/+2
| | | | (This used to be commit 5c9fd4d8963130829684469be172e859b3799e27)
* r1504: Remove insane use of "user password" on the COMMAND LINE !Jeremy Allison2007-10-101-25/+6
| | | | | | in smbpasswd. Use -s if you want to script this. Jeremy. (This used to be commit a3589a18b6898e2b51570112c5acb2826ef6ba4a)