summaryrefslogtreecommitdiff
path: root/source3/utils
AgeCommit message (Collapse)AuthorFilesLines
2002-05-24Some of the updates from ctrlsoft's 'Various' patch:Andrew Bartlett3-21/+25
- convert net to popt - convert status to popt - adapt examples/pdb/ to multiple passdb system - add dynamic debug class example to examples/pdb/ and some reformatting to better match the samba coding style. Andrew Bartlett (This used to be commit 2498bc69d4e5c38ec385f640489daa94c508c726)
2002-05-24Remove the password length paramater from cli_full_connection - it reallyAndrew Bartlett2-3/+3
didn't make any sense, and its was always just strlen(password) anyway. This fixes it to be strlen(password)+1 Andrew Bartlett (This used to be commit c205b18bd6b9b69200ff3db55f2c641631d4ab40)
2002-05-23Allow initial password set on net ads user add. I need to do this onJim McDonough1-3/+30
rpc and rap too. Anyone know what key I'm supposed to use to encrypt it for the rap one? (This used to be commit 033faaa8cbfe7e368c554b26e7a506098d06fa02)
2002-05-23Given Jeremy's positive response, and a lack of one from tpot, I'll commitAndrew Bartlett1-76/+39
this: More code cleanup - this lot a bit more dodgy than the last: The aim is to trim pwd_cache down to size. Its overly complex, and a pain to deal with. With a header comment like this: 'obfusticaion is planned' I think it deserved to die (at least partly). This was being done to allow 'cli_establish_connection' to die - its functionality has been replaced by cli_full_connection(), which does not duplicate code everywhere for creating names etc. This also removes the little 'init' fucntions for the various pipes, becouse they were only used in one place, and even then it was dodgy. (I've reworked smbcacls not to use anonymous connections any more, as this will (should) fail with a 'restrict anonymous' PDC). This allowed me to remove cli_pipe_util.c, which was calling cli_establish_connection. tpot: I'm not sure what direction you were going with the client stuff, and you may well have been wanting the init functions. If thats the case, give me a yell and I'll reimplement them against cli_full_connection. Andrew Bartlett (This used to be commit fa67e4626bed623333c571e76e06ccd52cba5cc5)
2002-05-22Add a bit more const, and kill of (finally!) sys_getpwnam and sys_getpwuid.Andrew Bartlett2-4/+6
These might be reimplmented as simple pass-through functions, but all users really should be doing 'getpwnam_alloc' or 'getpwuid_alloc' to ensure that there are not shared static buffers. I don't beleive we actually need a getpw*() cache inside samba - if we do then I think we should look at our code design first. (some of these changes are for platforms I don't have access to, but they look sane) Andrew Bartlett (This used to be commit 9d8431b04f41dceffe4c45cc969472ee59f7282f)
2002-05-19Keep the compiler happyAndrew Bartlett1-1/+0
(This used to be commit 84ea2a434b510ed49838a04a4b30bd2fc9ec5673)
2002-05-18so here it is the code to introduce seriously debugggging classes.Simo Sorce2-16/+33
this is a first step only passdb stuff has beein "classized". - so what can you do? set debug level to: 1 poasdb:10 that will make all the code run at debug level 1 except the code in passdb/* files that will run at level 10 TODO: fix the man page - also smbcontrol has this nice feature so smbcontrol smbd debug 3 passdb:5 will set every smbd to have a default log level of 3 while passdb stuff will be at level 5 and so no.. minor cosmetic fix to pdbedit is there too (This used to be commit be5c3b3f5781ddc002ffcc98df04ab024dcef4ca)
2002-05-18Make smbpasswd at least slightly sane. This kills off some of theAndrew Bartlett1-43/+43
silly global variables, and makes it come closer to a clean compile. I'm still not convinced what was wrong with the previous code, at least it didn't cause a gush of warnings... In any case, we now don't need to spegetti code gotos etc. This should really be redone with popt. Andrew Bartlett (This used to be commit d9330f10447f199a5a73803579ce3b1253f4d02c)
2002-05-18A few things in this commit:Andrew Bartlett1-7/+3
cleanup some of the code in net_rpc_join re const warnings and fstrings. Passdb: Make the %u and %U substituions in passdb work. This is done by declaring these paramters to be 'const' and doing the substitution manually. I'm told this is us going full circle, but I can't really see a better way. Finally these things actually seem to work properly... Make the lanman code use the pdb's recorded values for homedir etc rather than the values from lp_*() Add code to set the plaintext password in the passdb, where it can decide how to store/set it. For use with a future 'ldap password change' option, or somthing like that... Add pdb_unix, so as to remove the 'not in passdb' special cases from the local_lookup_*() code. Quite small, as it uses the new 'struct passwd -> SAM_ACCOUNT' code that is now in just one place. (also used by pdb_smbpasswd) Other: Fix up the adding of [homes] at session setup time to actually pass the right string, that is the unix homedir, not the UNC path. Fix up [homes] so that for winbind users is picks the correct name. (bad interactions with the default domain code previously) Change the rpc_server/srv_lsa_nt.c code to match NT when for the SATUS_NONE_MAPPED reply: This was only being triggered on no queries, now it is on the 'no mappings' (ie all mappings failed). Checked against Win2k. Policy Question: Should SID -> unix_user.234/unix_group.364 be considered a mapping or not? Currently it isn't. Andrew Bartlett (This used to be commit c28668068b5a3b3cf3c4317e5fb32ec9957f3e34)
2002-05-17Make --with-ldapsam 'go away'. This is now a standard, stable, featureAndrew Bartlett1-13/+0
and there is no real reason for it to depend on more than the abilty to compile the code. (This used to be commit 64aaec137e39595e6e61b55eb525615683a1393c)
2002-05-17Changes to allow head to translate NMB flags ...Richard Sharpe1-4/+30
(This used to be commit c986a19cde0dfa96b512eb24d873203981e68c48)
2002-05-15merges from SAMBA_2_2Gerald Carter1-3/+3
(This used to be commit 91f569a691be893e1a02c659a8f0753970fadbae)
2002-05-15Added ability to lookup ldap server, kdc, dc, and master browser. PleaseJim McDonough1-2/+171
review especially the methods for finding kdc and ldap server when they're not specified. This is a first attempt... (This used to be commit 5edccb51b94a80bbb3ecd59602393887286c8074)
2002-05-13Add auto-detect of time server. Uses master browser.Jim McDonough1-2/+4
(This used to be commit c2a6b0b1269b2e2abcf675538869dfba3cab8894)
2002-05-11merge from SAMBA_2_2Gerald Carter1-0/+8
(This used to be commit b41cefb4c0670b06564ac79fa10aff8d60069f10)
2002-05-10Allow -c to specify the location of the config file, and fix up some handlingAndrew Bartlett1-13/+15
of non-existant passdb cases. (This used to be commit e56de32f5ce5cb301137497451b0ccd633f09f54)
2002-05-09Converged net group command.Jim McDonough1-3/+13
(This used to be commit 95cc3fa4d3e566f540090ed499e80d86eb55e895)
2002-05-09Add ads group add and delete, allowing converged net group command.Jim McDonough1-16/+106
Also update some of the help info. (This used to be commit fde62de7a1735b2ef2d9593b38ffa5c7ea2e0d67)
2002-05-09Start of net rpc group command. List only right now. Add and delete haveJim McDonough1-1/+153
not been implemented...is it worth the effort? (This used to be commit 45ac4f4c29d0d8d1b0b1535b2ab500e38ac5b978)
2002-05-09Converged help on net group command.Jim McDonough2-12/+18
(This used to be commit 9de5e0dc73f57e8c8b878da803452b86e6ce8fca)
2002-05-09pidfile merge from SAMBA_2_2 (including --with-fhs) and a few other minor ↵Gerald Carter1-0/+6
things; compiles and shouldnt break, but needs testing (This used to be commit 19b9b50d9039afe614284aaf379f9f1078e2e307)
2002-04-26fix compile errorHerb Lewis1-1/+6
(This used to be commit c64a57a6106bfd766679ac89837881ed9592409b)
2002-04-18fixed the fallback to a BDC for ADS connectionsAndrew Tridgell1-5/+4
(This used to be commit 3e58a1ee83ea0b4347ce24e566445cc6cb67bb3a)
2002-04-16we did not initialise global_myname and global_myworkgroup which lead toJean-François Micouleau1-1/+14
duplicate entries in secrets.tdb and false SID generated. took me *hours* to understand. J.F. (This used to be commit bfc3a25b776a5a66e1bd0e2c60c101cea87ef4d5)
2002-04-15Another patch from jelmer:Andrew Bartlett1-31/+37
Doco for pdbedit and (ugly, but the best we could come up with) fix for compiling pdbedit on some non-gcc compilers. Andrew Bartlett (This used to be commit 80adf1dbb56cf8bdbfbcc2c8c7b670c0a23c97f8)
2002-04-14Merge from 2_2.Volker Lendecke1-0/+9
Volker (This used to be commit 8973a01f5efa547ed356e27fe1660da732b24cdd)
2002-04-14The cli_lsa_lookup_{names,sids} functions were returning uselessTim Potter1-7/+5
information when one or more of the names/sids being queried were not resolvable. We now return a list the same length as the parameters passed instead of an array of just the resolvable names/sids. (This used to be commit 245468dbabb7c849ce423cc3cb586fa913d0adfe)
2002-04-14Partly based on the work by mimir (Rafal SzczesniakAndrew Bartlett1-18/+22
<mimir@diament.ists.pwr.wroc.pl>) this patch allows samba to correctly enumerate its trusted domains - by exaimining the keys in the secrets.tdb file. This patch has been tested with both NT4 and rpcclient/wbinfo, and adds some extra functionality to talloc and rpc_parse to allow it to deal with already unicode strings. Finally, this cleans up some const warnings that were in net_rpc.c by pushing another dash of const into the rpc client code. Andrew Bartlett (This used to be commit 0bdd94cb992b40942aaf2e5e0efd2868b4686296)
2002-04-14Fixed debugs.Tim Potter1-2/+2
(This used to be commit 6d9336f3b9b205e5916424ee844658b445439fdb)
2002-04-13More updates from ctrlsoft. (Jelmer Vernooij <jelmer@nl.linux.org>)Andrew Bartlett1-8/+32
Andrew Bartlett (This used to be commit 012b3326c40ca0f8f4c7673310d73f695cc4f79b)
2002-04-13This is the 'multiple pdb backends' patch from ctrlsoft, aka Jelmer VernooijAndrew Bartlett1-318/+110
<jelmer@nl.linux.org>. This patch also includes major rework of pdbedit to use popt, and the addition of -i paramter (allowing the user to specify which PDBs is being operated on) and -e to export a pdb - useful for backup and testing etc. Use of -i and -e gets us pdb2pdb functionality for transition between backends, much like the sam2sam in TNG. Andrew Bartlett (This used to be commit c10def37f506d3f2bab442418ac08fdb62659b02)
2002-04-10Rename of ads_do_search_all2() to ads_do_search_all() and removal ofJim McDonough1-23/+11
server sort controls. Also put option externs in the net.h include. (This used to be commit b69f11170c2b27016c44a98bc603d1c94ad7d4c2)
2002-04-10Add a few option externs for net_ads.cJim McDonough1-0/+4
(This used to be commit 4e3265c3c94583ac7ee48017d195ad98ecdfbc47)
2002-04-10fixed a return value for a help functionAndrew Tridgell1-0/+1
(This used to be commit da794d3bbd919e4a909f219d98b1411c1c2d60fd)
2002-04-07Spelling.Tim Potter1-1/+1
(This used to be commit 423985ed569ac9692f3cb5872a15c74f983121b6)
2002-04-05Use the new ads_do_search_all2 function. It provides sorted results. We nowJim McDonough1-30/+18
also filter out users that end in '$', which gives us the same results as the net rpc user and net rap user. (This used to be commit e3a813831276ec2aafa0caa4f4fed0785dcdb749)
2002-04-05Lots more net consistency work:Jim McDonough5-117/+470
- Added net_help.c for unified help when possible - Added net rpc user listing, delete, info commands - Unified net user command to autodetect ads/rpc/rap (try in that order) - Added generic routine for detecting rpc (protocol > PROTOCOL_NT1) - I'm sure I forgot something. (This used to be commit 9daa5788c822cf1ad20dc703e7f03b9ee82987bf)
2002-04-04Multiple changes:Jim McDonough1-11/+16
- Get rid of improper "Invalid option: d (100)" message when setting debug from commandline. - Eliminate got_pass global and only use opt_password. This enables re-use of password that may have been enetered in failed ads connect. - Auto-detect method for net user command - use new net_ads_check rather than lp_security==ADS test on net join - Get rid of annoying debug level 0's (This used to be commit 1280968000595c28ed62d9e74acecfdc84e33710)
2002-04-04Cleanups to make auto-detection of method on net user smoother.Jim McDonough1-5/+10
(This used to be commit 84ab1042a65e3c41a76f4726914140d505ef4625)
2002-04-04More updates for auto-detecting server connection method. Added net_ads_check()Jim McDonough1-5/+38
to make a connection (which stores the password in a global so it can be used by rpc or rap function if ads fails) and close it to verify if ads method should be used. (This used to be commit 093297a27db9834cf8aea34302246af8997d9c66)
2002-04-04Add non-ads version of net_ads_help for build on non-ads machines.Jim McDonough1-0/+6
(This used to be commit dd7c20e5331116fd8cf9656a0f2406957b812bbb)
2002-04-04Correct error string function call to ads_errstr()Jim McDonough1-3/+3
(This used to be commit d7317ca8da4b04804f4d01752cef56ec5a9c3418)
2002-04-04Add ability to get specific net ads subcommand help. Not all have beenJim McDonough1-1/+1
implemented yet... (This used to be commit 24c6bf4e8b6d519340d5f9f3353ffc6b5f7520b3)
2002-04-04Add net ads user subcommands: add delete info. Also make user listing formatJim McDonough1-12/+169
consistent with rap version. (This used to be commit f6eb7c0c7ec83a3674d56f0e222b900887327319)
2002-04-03reorder useage message a little. -L is not a root-only or local mode option.Herb Lewis1-7/+8
(This used to be commit 020d6fa2f780099d662de1a456838ec0ac4d3ca7)
2002-04-02readd -c config file change from 2.2 - works with -L mode now as well.Herb Lewis1-180/+178
(This used to be commit af4c3734b5d617352597b1b964745f5b0d334b2d)
2002-04-01reverted Herbs smbpasswd commit as it completely broke setting aAndrew Tridgell1-178/+181
password (This used to be commit a5807d5784dc903f1ea38a9825240a505688b7be)
2002-03-30merge from 2.2 - allow -c option to specify smb.conf fileHerb Lewis1-181/+178
(This used to be commit fc15b56d29b4474032f4d9136313afee60e70cbf)
2002-03-29Re-implemented net ads user and net ads group to use the newJim McDonough2-22/+54
ads_process_results function. Also made sure net rap user and net ads user display the same thing, to make auto-transport-detection smoother. (This used to be commit 4cf42c07ec5deb14921fabfbd52a8a3345a730c9)
2002-03-29added a shutdown command to smbcontrol.Jean-François Micouleau1-0/+6
have to add the server side now. J.F. (This used to be commit b83f87d6811dbad2c254cd5add4bbedb3196c629)