summaryrefslogtreecommitdiffstats
path: root/source/utils
Commit message (Collapse)AuthorAgeFilesLines
* Removed version number from file header.Tim Potter2002-01-3021-32/+13
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* Since we have dynamic initialisation in the group mapping code, makeTim Potter2002-01-291-5/+0
| | | | | | | init_group_mapping() a static function and don't call it from any client programs. Not sure whether I've made a bigger mess here or not...
* Give pdbedit a -D paramater for setting the DEBUGLEVEL (makes debugging passdbAndrew Bartlett2002-01-271-5/+10
| | | | | | | | | much saner :-). Change to pdb_init_sam()/pdb_free_sam() loop rather than reset based due to the talloc basis. Andrew Bartlett
* Back out some of the less well thought out ideas from last weeks work onAndrew Bartlett2002-01-261-5/+2
| | | | | | | | | | winbind default domains, particulary now I understand whats going on a lot better. This ensures that the RPC client code does as little 'magic' as possible - this is up to the application/user. (Where - for to name->sid code - it was all along). This leaves the change that allows the sid->name code to return domains and usernames in seperate paramaters. Andrew Bartlett
* The new plugable password backend system needs to be initialised afterAndrew Bartlett2002-01-261-5/+5
| | | | | | lp_load(). Andrew Bartlett
* Try to get the compiler not to complain about assignments and truth values...Andrew Bartlett2002-01-261-2/+1
| | | | Andrew Bartlett
* Enable net ads commands to use existing tickets if the user doesn't specify ↵Jim McDonough2002-01-252-4/+21
| | | | a username on the commandline. Also don't continue past the kinit if a password is entered and fails because existing tickets would be used, which may not be desired if the username was specified.
* getpwnam -> getpwnam_alloc.Andrew Bartlett2002-01-231-6/+10
| | | | idra has promised not to revert these this time :-)
* This is another *BIG* change...Andrew Bartlett2002-01-202-40/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 patch makes the 'winbind use default domain' code interact better withAndrew Bartlett2002-01-201-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | smbd, and also makes it much cleaner inside winbindd. It is mostly my code, with a few changes and testing performed by Alexander Bokovoy <a.bokovoy@sam-solutions.net>. ab has tested it in security=domain and security=ads, but more testing is always appricatiated. The idea is that we no longer cart around a 'domain\user' string, we keep them seperate until the last moment - when we push that string into a pwent on onto the socket. This removes the need to be constantly parsing that string - the domain prefix is almost always already provided, (only a couple of functions actually changed arguments in all this). Some consequential changes to the RPC client code, to stop it concatonating the two strings (it now passes them both back as params). I havn't changed the cache code, however the usernames will no longer have a double domain prefix in the key string. The actual structures are unchanged - but the meaning of 'username' in the 'rid' will have changed. (The cache is invalidated at startup, so on-disk formats are not an issue here). Andrew Bartlett
* much better support for organisational units in ADS joinAndrew Tridgell2002-01-161-3/+7
|
* Change the passdb interface to use allocated strings.Andrew Bartlett2002-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | These strings are allocated using talloc(), either using its own memory context stored on the SAM_ACCOUNT or one supplied by the caller. The pdb_init_sam() and pdb_free_sam() function have been modifed so that a call to pdb_free_sam() will either clean up (remove hashes from memory) and destroy the TALLOC_CTX or just clean up depending on who supplied it. The pdb_init_sam and pdb_free_sam functions now also return an NTSTATUS, and I have modified the 3 places that actually checked these returns. The only nasty thing about this patch is the small measure needed to maintin interface compatability - strings set to NULL are actually set to "". This is becouse there are too many places in Samba that do strlen() on these strings without checking if they are NULL pointers. A supp patch will follow to set all strings to "" in pdb_default_sam(). Andrew Bartlett
* Quieten warning about uninitialized variable.Martin Pool2002-01-101-1/+3
|
* Add two more memory-debug smbcontrol messages: these ones shouldMartin Pool2002-01-091-6/+17
| | | | | prompt dmalloc to log information about what happening, so you can see in flight why smbd is getting bloated.
* merge changes from 2.2 branch to prevent smb.conf from changing debug levelHerb Lewis2002-01-076-0/+23
| | | | of commands when specified on command line.
* sync getopt() args with 2.2Gerald Carter2002-01-071-1/+1
|
* print the timezone in the same format as 'date +%z' - much better for scriptingAndrew Tridgell2002-01-041-5/+8
|
* Cleanup format.Martin Pool2002-01-031-1/+1
|
* smbd now sends a reply to MSG_REQ_POOL_USAGE, though it's prettyMartin Pool2002-01-031-1/+2
| | | | boring so far.
* smbd should register to receive MSG_REQ_POOL_USAGE. Response shouldMartin Pool2002-01-031-2/+0
| | | | be information about memory usage, but this is not done yet.
* Actually enforce the passdb API.Andrew Bartlett2002-01-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Thou shalt not reference SAM_ACCOUNT members directly - always use pdb_get/pdb_set. This is achived by making the whole of SAM_ACCOUNT have a .private member, where the real members live. This caught a pile of examples, and these have beeen fixed. The pdb_get..() functions are 'const' (have been for some time) and this required a few small changes to constify other functions. I've also added some debugs to the pdb get and set, they can be removed if requested. I've rewritten the copy_id2x_to_sam_pass() functions to use the new passdb interface, but I need the flags info to do it properly. The pdb_free_sam() funciton now blanks out the LM and NT hashes, and as such I have removed many extra 'samr_clear_sam_passwd(smbpass)' calls as a result. Finally, any and all testing is always appriciated - but the basics seem to work. Andrew Bartlett
* reverted to 1.24 and manually merged in changes from 2.2Gerald Carter2001-12-311-194/+71
|
* Add 'net rpc shutdown' and 'net rpc abortshutdown'.Andrew Bartlett2001-12-313-7/+177
| | | | | | | | These two little features are very useful, but the passing of options about needs some serious work. The popt stuff in the shutdown code is #ifdef'ed out until the main popt loop can be convinced not to chew on the options :-( Andrew Bartlett
* fix compile errorGerald Carter2001-12-311-1/+3
|
* some merges from 2.2. Still need to merge in changes from pdb_tdb.cGerald Carter2001-12-311-74/+199
| | | | | but it will take more time as I don't want to loose any fixes that are only in HEAD.
* Add a pile of doxygen style comments to various parts of Samba. Many of theseAndrew Bartlett2001-12-302-50/+236
| | | | | | | | | probably will never actually be genearted, but I like the style in any case. Also fix a segfault in 'net rpc' when the login failed and a small memory leak on failure in the auth_info.c code. Andrew Bartlett
* moving SAM_ACCOUNT to include a bit field for initializedGerald Carter2001-12-271-9/+9
| | | | | | | | | | | | | | | | | | | | 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
* smbcontrol in non-interactive mode was returning True for success --Martin Pool2001-12-211-1/+4
| | | | need to invert this to give the shell 0.
* Add option to pass NULL max_replies to wait_for_replies in case youMartin Pool2001-12-211-4/+7
| | | | don't know how many to expect.
* Add code to send MSG_REQ_POOL_USAGE. (smbd doesn't respond yet.)Martin Pool2001-12-211-15/+57
| | | | | | | Factor out common code to wait until replies are received or timeout expires. Show debug message when messages are sent.
* make sure we store the domain sid when joining a ADS domainAndrew Tridgell2001-12-201-0/+12
|
* added net lookup commandAndrew Tridgell2001-12-202-1/+65
|
* net now sends its debug to stderr so its output can be relied upon inAndrew Tridgell2001-12-201-1/+1
| | | | scripts
* net ads password and net ads chostpass commands from Remus KoosAndrew Tridgell2001-12-201-0/+91
|
* much better ADS error handling systemAndrew Tridgell2001-12-191-24/+20
|
* - added initial support for trusted domains in winbindd_adsAndrew Tridgell2001-12-191-3/+6
| | | | | | - gss error code patch from a.bokovoy@sam-solutions.net - better sid dumping in ads_dump - fixed help in wbinfo
* Fixup JF's weird SID return :-).Jeremy Allison2001-12-181-1/+1
| | | | Jeremy
* allow selection of the organisational unit when joining a realmAndrew Tridgell2001-12-171-6/+28
|
* Rafal (mimir) patch for trusts r.Jean-François Micouleau2001-12-141-1/+21
|
* Display a nice error message if the user%password specified for net rpcTim Potter2001-12-141-2/+8
| | | | join does not have administrator privileges.
* Display a nice error message for NT_STATUS_LOGON_FAILURE in connect_to_ipc()Tim Potter2001-12-141-0/+7
|
* More help/messages/formatting cleanup.Jim McDonough2001-12-141-37/+40
|
* Merge from 2.2 to allow net rpc join -U to complete even if the workstationTim Potter2001-12-141-2/+5
| | | | | | | | | 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.
* Restoration of at least some help function and format. First round of ↵Jim McDonough2001-12-141-259/+221
| | | | cleanup. Printq function cannot exactly mimic windows output using d_printf...oh well. Add some more command-specific options back into help.
* Set the debuglevel after the call to lp_load() so the change sticks.Tim Potter2001-12-141-2/+2
|
* don't use -u switch to /bin/date - too many systems don't honor itAndrew Tridgell2001-12-141-4/+4
|
* update the ldap support code. it compiles.Jean-François Micouleau2001-12-131-1/+41
| | | | | | | | Ignacio you can update your howto ;-) samsync: a small patch to try chaning challenges. J.F.
* added "net ads info" to fetch basic ADS info without any authAndrew Tridgell2001-12-131-0/+26
|
* improved error message from failed connectAndrew Tridgell2001-12-131-6/+3
|
* added "net time zone" command to show the timezone on a computerAndrew Tridgell2001-12-121-6/+30
|