summaryrefslogtreecommitdiff
path: root/source3/utils/net.c
AgeCommit message (Collapse)AuthorFilesLines
2002-07-29Use common popt definition for -d option.Tim Potter1-2/+1
(This used to be commit 8c17904848a6206ab35652625ff5f3afcf6bcb0d)
2002-07-27Rafal 'Mimir' Szczesniak <mimir@diament.ists.pwr.wroc.pl> has been busyAndrew Bartlett1-1/+1
again, and has added 'net rpc trustdom list' support. This lists the trusted and trusting domains of a remote PDC. I've applied these almost directly, just fixing some special case code for when there are *no* trusting domains. We still have some parse errors in this case however. Andrew Bartlett. From mimir's e-mail: Here are another patches adding trust relationship features. More details: Better error reporting in cli_lsa_enum_trust_dom(). Implementation of cli_samr_enum_dom_users() which cli_samr.c lacked. More "consts" -- one of arguments in net_find_dc(). Modified implementation of run_rpc_command() -- now it allows to reuse already opened connection (if it is passed) to remote server's IPC$ (e.g. as part of longer exchange of rpc calls). I'm sure Andrew will argue ;-) More neat version of rpc_trustdom_list() function. (This used to be commit f0890026820ee3e432147130b46de4610e583381)
2002-07-14move opt_machine_pass to keep some compilers happyAndrew Tridgell1-1/+1
(This used to be commit 39e11ef5b1090e51c6c447c8037a43b52e04b881)
2002-07-13added --machine-pass option to net. This allows you to authenticate asAndrew Tridgell1-1/+21
the current machine account and password. This is useful both for diagnostics and domain leave. (This used to be commit 73b246981fd5b27cc1d835946b89e82f5b78f332)
2002-06-25Update cli_full_connection() to take a 'flags' paramater, and try to get aAndrew Bartlett1-2/+2
few more places to use it. Andrew Bartlett (This used to be commit 23689b0746d5ab030d8693abf71dd2e80ec1d7c7)
2002-06-01Add remainder of net rpc file subcommands, and autoselect transport onJim McDonough1-2/+1
net file (This used to be commit fd938eca210602790c4d0e442f3aa9aa22b5fdf2)
2002-05-31Enable all net rpc share subcommands and autoselect transport.Jim McDonough1-2/+1
(This used to be commit ebd07c3a295e3f8cd46441caac4dc8e8b178c2cc)
2002-05-31Enable net rpc share and net rpc file commands (list subcommands only), andJim McDonough1-6/+20
autoselect for this subcommand when appropriate. (This used to be commit 77418256d3162b41a672a25f7e512999f1193926)
2002-05-24Some of the updates from ctrlsoft's 'Various' patch:Andrew Bartlett1-5/+9
- 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 Bartlett1-2/+2
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-09Converged net group command.Jim McDonough1-3/+13
(This used to be commit 95cc3fa4d3e566f540090ed499e80d86eb55e895)
2002-04-05Lots more net consistency work:Jim McDonough1-82/+10
- 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-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-03-21There is no reason we can't join a domain with secuirty=user. In fact weAndrew Bartlett1-5/+0
need to when we are a BDC or a PDC doing a self-join. Andrew Bartlett (This used to be commit 996cd3a0979a92b087003982bc61796a8090a787)
2002-03-17Renamed get_nt_error_msg() to nt_errstr().Tim Potter1-2/+2
(This used to be commit 1f007d3ed41c1b71a89fa6be7d173e67e927c302)
2002-03-15Add autodetect for net join, as well as some more help updatesJim McDonough1-1/+18
(This used to be commit 951006374e48d80a5128d870bdc255bf8c22cb6a)
2002-03-15Some help cleanups. Formatting and consistency issues. Line up text ↵Jim McDonough1-24/+48
nicely, and make 'net help rap user' the same as 'net rap user help'...stuff like that (This used to be commit 17775dae28c724b11cc73f2aeac5f07f9656046c)
2002-03-01The beginning of trusted and trusting domain support fromAndrew Bartlett1-13/+41
Rafal Szczesniak <mimir@diament.ists.pwr.wroc.pl> This adds the 'net' tools to manipulate the trusted domains. Andrew Bartlett (This used to be commit 770c8a31d9804d3339ffa0de8b5072a5c7eb02df)
2002-01-30Removed version number from file header.Tim Potter1-1/+0
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2002-01-25Enable net ads commands to use existing tickets if the user doesn't specify ↵Jim McDonough1-0/+2
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. (This used to be commit 7e5d7dfa834c0161460bde8a2f0d4824c0a0d1fe)
2001-12-31Add 'net rpc shutdown' and 'net rpc abortshutdown'.Andrew Bartlett1-0/+6
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 (This used to be commit 51c985be7fbfe5627c5b2590e7610653e7be98e3)
2001-12-20added net lookup commandAndrew Tridgell1-1/+3
(This used to be commit 51268c512dbae94aba308668df9facaf15a2ce9e)
2001-12-20net now sends its debug to stderr so its output can be relied upon inAndrew Tridgell1-1/+1
scripts (This used to be commit 6d2f7ed708e75687d23f432ba9a186e88fa14118)
2001-12-14Display a nice error message for NT_STATUS_LOGON_FAILURE in connect_to_ipc()Tim Potter1-0/+7
(This used to be commit 60eb4dc7b1114275f035d27a890e0301a65e0e42)
2001-12-14Set the debuglevel after the call to lp_load() so the change sticks.Tim Potter1-2/+2
(This used to be commit 3c927e39e7354d2f65b3ff7148fc325b41552310)
2001-12-13improved error message from failed connectAndrew Tridgell1-6/+3
(This used to be commit 4405a87fb754cece3a5428246ea6ecb9abba1996)
2001-12-11added a net time command. Allow display or set of system time based onAndrew Tridgell1-12/+14
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 b3ba2293d0e4eac3b6408c3abc3dcacfa3f67fe4)
2001-12-11Removed unreferenced getopt() externals.Tim Potter1-2/+0
(This used to be commit c87d1ad32114200d3e678f8de88874c737f8e571)
2001-12-10reinstated all the rap commands as top level commands until we get theAndrew Tridgell1-2/+35
protocol switch mechanism in place (This used to be commit d20c3717dd58745da082d1b4df7698c6d6c38e6c)
2001-12-05OK. Smbpasswd -j is DEAD.Andrew Bartlett1-1/+3
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 575897e879fc175ba702adf245384033342c903d)
2001-12-05Make it easier to construct anonymous connections with a new flag and helperAndrew Bartlett1-2/+28
function. (This used to be commit 61b0f5f4f9788784b0806a9a15cbc6bf1005aa68)
2001-12-05Split out the name resolution code into a seperate functionAndrew Bartlett1-27/+38
(This used to be commit b2443f6fca5840584926b7481acf1975507c445e)
2001-12-04Some changes to the name resolution code in 'net' to allow us to find aAndrew Bartlett1-25/+41
PDC, as well as changes for correctness as per tridge. Andrew Bartlett (This used to be commit 16d302c5cc0da93a58e0ce10843f9c8d8062c689)
2001-12-03This change reworkes the connection code for both rpcclient and net newAndrew Bartlett1-72/+13
'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 eee925861a3af3aa16efa3b1700a980c9510c14e)
2001-12-03This is another major rework of the 'net' command.Andrew Bartlett1-1057/+76
This time, all the existing functionality has been moved into 'net rap', ready for new commands in the 'net ads' and 'net rpc' categories. In particular, we hope to have the abilty to autoselect the appropriate backend to use based on smb.conf or other paramaters. This will allow 'net user' to work no matter what the remote server. The new 'net rpc' command will soon gain a 'net rpc join' and a 'net rpc user' based on the existing samba code. Also in this commit, the connection establishment code has been almost entirly reworked, and now has some minor sense of sainity to it. In particular, we can now connect to hosts *other* than localhost! We also have the ability to state on a per-command basis whether the 'localhost' is a sane default value. (A net join, for example, would not be sane against localhost). Unfortunetly we have had to make the basic paramaters global variables, but the 'cli' is not opened and closed on a per-command basis. Andrew Bartlett (This used to be commit 8739d426caabe3794a018dd28ab139b08f88b603)
2001-11-28fix a bunch of places where we can double-free a cli structureAndrew Tridgell1-4/+0
(This used to be commit e2ba2383c9f679c076749a8f4fccefc3559e37ec)
2001-11-26prevent proto from picking up this as a defintion for 'main()' becoue it ↵Andrew Bartlett1-1/+1
conflicts with nmbd's definition. (This used to be commit 70e9c2efaada4be609ff053d216d554cb036df4e)
2001-11-26More compiler warnings fixed. Some minor reformatting.Tim Potter1-91/+140
(This used to be commit 8227f6909cca67fcc1a8455f4b386df7778ef2e7)
2001-11-26Got medieval on another pointless extern. Removed extern struct ipzeroTim Potter1-5/+5
and replaced with two functions: void zero_ip(struct in_adder *ip); BOOL is_zero_ip(struct in_addr ip); (This used to be commit 778f5f77a66cda76348a7c6f64cd63afe2bfe077)
2001-11-25portability fixesAndrew Tridgell1-3/+6
(This used to be commit 09127d85dc91037c9d0280b57d48d23e93a39f8b)
2001-11-25fixed typoAndrew Tridgell1-1/+1
(This used to be commit b14ae495028da4d2b995cefa786746d2c649460c)
2001-11-25made a "net ads" command, currently with "net ads join" and "net ads leave"Andrew Tridgell1-4/+4
(This used to be commit 2f8fa175b189c2d11676245b01d3201c0a4f0826)
2001-11-24added "net join" commandAndrew Tridgell1-185/+48
this completes the first stage of the smbd ADS support (This used to be commit 058a5aee901e6609969ef7e1d482a720a84a4a12)
2001-11-24rewrote net.cAndrew Tridgell1-1260/+1071
The rewrite fixes a number of things: - much better command line parsing - fixed usage of static and const - better finding of hosts - clean internal separation of sub-functions - expandable design (This used to be commit 0f88d9c50e419504b9ceca5eadbe30ee04fa42dc)
2001-11-19Store some path names in global variables initialized to configureMartin Pool1-1/+1
default, rather than in preprocessor macros. (This used to be commit 79ec88f0da40faebe1e587f1b3e87b5f2b184f58)
2001-11-12Minor fixes to help display, and domain enumeration , and also preparation ↵Steve French1-19/+35
for new command option (This used to be commit 3623fbb4f0182b201d62491fa0680c29a4fd68e3)
2001-11-06Internationalization enbalement for net utility - replace printf with d_printfJim McDonough1-233/+233
(This used to be commit b83b21e9ca364a097455c119815074f23324111d)
2001-11-04Got serious about const again.Jeremy Allison1-18/+18
REMOVED BZERO CALLS YET AGAIN !!! Why do these keep creeping back in.... They are *NOT* POSIX. I'm also thinking of removing strncpy as I'm sure it's not being used correctly.... Jeremy. (This used to be commit b1930abb35dee74f858a3f7190276c418af2322b)
2001-11-03Adding support for net password, net service, net user info, fixing net helpsSteve French1-59/+258
(This used to be commit a1f3930637a6ccadd4dba90dcd713cf1e4b5a536)