summaryrefslogtreecommitdiffstats
path: root/source/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* we now parse the cldap reply and print its contents. There are aAndrew Tridgell2002-08-191-4/+82
| | | | couple of unknown fields we still need to work out.
* we now receive and parse the main cldap netlogon reply.Andrew Tridgell2002-08-191-10/+88
| | | | we still need to parse the core of the structure
* added a 'net ads lookup' command that does a CLDAP NetLogon query to aAndrew Tridgell2002-08-192-0/+121
| | | | | win2000 server. It does seem to work, and win200 sends us a valid reply, but we don't parse it yet. Maybe tomorrow :)
* *** empty log message ***Simo Sorce2002-08-151-87/+175
|
* Merge some usage info from APPLIANCE_HEAD.Tim Potter2002-08-111-0/+3
|
* Fix the %m security bug again - and try to make it harder to reintroduce inAndrew Bartlett2002-08-101-4/+5
| | | | | | | | | | | future. This moves us from fstrcpy() and global variables to 'get' and 'set' functions. In particular, the 'set' function sainity-checks the input, in the same way as we always have. Andrew Bartlett
* fixed 'net ads chostpass' for new ads structuresAndrew Tridgell2002-08-061-1/+11
|
* added 'net rpc testjoin' and 'net ads testjoin' commandsAndrew Tridgell2002-08-053-20/+125
| | | | | unfortuately we don't seem to be able to auto-test the ADS join due to a rather nasty property of the GSSAPI library.
* This fixes a number of ADS problems, particularly with netbioslessAndrew Tridgell2002-08-053-31/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setups. - split up the ads structure into logical pieces. This makes it much easier to keep things like the authentication realm and the server realm separate (they can be different). - allow ads callers to specify that no sasl bind should be performed (used by "net ads info" for example) - fix an error with handing ADS_ERROR_SYSTEM() when errno is 0 - completely rewrote the code for finding the LDAP server. Now try DNS methods first, and try all DNS servers returned from the SRV DNS query, sorted by closeness to our interfaces (using the same sort code as we use in replies from WINS servers). This allows us to cope with ADS DCs that are down, and ensures we don't pick one that is on the other side of the country unless absolutely necessary. - recognise dnsRecords as binary when displaying them - cope with the realm not being configured in smb.conf (work it out from the LDAP server) - look at the trustDirection when looking up trusted domains and don't include trusts that trust our domains but we don't trust theirs. - use LDAP to query the alternate (netbios) name for a realm, and make sure that both and long and short forms of the name are accepted by winbindd. Use the short form by default for listing users/groups. - rescan the list of trusted domains every 5 minutes in case new trust relationships are added while winbindd is running - include transient trust relationships (ie. C trusts B, B trusts A, so C trusts A) in winbindd. - don't do a gratuituous node status lookup when finding an ADS DC (we don't need it and it could fail) - remove unused sid_to_distinguished_name function - make sure we find the allternate name of our primary domain when operating with a netbiosless ADS DC (using LDAP to do the lookup) - fixed the rpc trusted domain enumeration to support up to approx 2000 trusted domains (the old limit was 3) - use the IP for the remote_machine (%m) macro when the client doesn't supply us with a name via a netbios session request (eg. port 445) - if the client uses SPNEGO then use the machine name from the SPNEGO auth packet for remote_machine (%m) macro - add new 'net ads workgroup' command to find the netbios workgroup name for a realm
* passwords where not checked (you cannot check if the same buffer differs ↵Simo Sorce2002-08-041-6/+18
| | | | | | | | from itself). they where alo not clean after use! Simo.
* Merge of print notify fixes from APPLIANCE_HEAD.Tim Potter2002-08-021-0/+17
|
* fixed a net crash bug if we can't find a DC in a 'net rpc' commandAndrew Tridgell2002-07-311-0/+4
|
* make sure that 'net ads info' gives info on the server we specify, notAndrew Tridgell2002-07-311-0/+4
| | | | our smb.conf setup.
* net ads info now reports the IP of the LDAP server as well as its name - ↵Andrew Tridgell2002-07-301-0/+1
| | | | very useful in scripts
* Use common popt definition for -d option.Tim Potter2002-07-292-3/+2
|
* Add the ability to set account policies too.Andrew Bartlett2002-07-281-7/+25
| | | | Andrew Bartlett
* Clean this code up a little. If it's alrady asprintf()ed, I see noAndrew Bartlett2002-07-281-2/+3
| | | | need for a manual strdup() too...
* Rafal 'Mimir' Szczesniak <mimir@diament.ists.pwr.wroc.pl> has been busyAndrew Bartlett2002-07-272-54/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Mimir has been busy with patches again, and sent in the followingAndrew Bartlett2002-07-261-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | patches: Andrew Bartlett From his e-mail: Below I attach the following patches as a result of my work on trusted domains support: 1) srv_samr_nt.c.diff This fixes a bug which caused to return null string as the first entry of enumerated accounts list (no matter what entry, it was always null string and rid) and possibly spoiled further names, depeding on their length. I found that while testing my 'net rpc trustdom list' against nt servers and samba server. 2) libsmb.diff Now, fallback to anonymous connection works correctly. 3) smbpasswd.c.diff Just a little fix which actually allows one to create a trusting domain account using smbpasswd 4) typos.diff As the name suggests, it's just a few typos fix :)
* Make it possible to query account policy values from pdbedit (set to come soon).Andrew Bartlett2002-07-241-11/+29
| | | | | | | | | | | Update account_pol.c to use just uint32, rather then uint32 for paramaters, int32 for storage. (The int32 functions didn't have seperate return/status values, uint32 functions use a pointer-paramater). Move the #define -> string from a swtich to a table, so we can look it up both ways. Andrew Bartlett
* Fix up dir drive call.Tim Potter2002-07-211-1/+1
|
* More cleanups, and add a comment/hint not to clean somthing up in future :-)Andrew Bartlett2002-07-211-8/+0
| | | | Andrew Bartlett
* Another smattering of static and constAndrew Bartlett2002-07-213-3/+3
|
* Renamed all the new_cli_netlogon_* functions to cli_netlogon_*Tim Potter2002-07-211-1/+1
| | | | as they're no longer new!
* Oops, my bad. I forgot to assign this, so lookupnames wasn't doing much :-)Andrew Bartlett2002-07-201-0/+1
|
* More fixes towards warnings on the IRIX compilerAndrew Bartlett2002-07-201-3/+5
| | | | | | | | | | | | (and yes, some of these are real bugs) In particular, the samr code was doing an &foo of various types, to a function that assumed uint32. If time_t isn't 32 bits long, that broke. They are assignment compatible however, so use that and an intermediate variable. Andrew Bartlett
* correctly declare global_myworkgroup to be the right size.Andrew Bartlett2002-07-201-1/+1
| | | | Andrew Bartlett
* Try to fix up warnings - particularly on the IRIX 64 bit compiler (which had aAndrew Bartlett2002-07-202-5/+6
| | | | | | | | distinction between uchar and char). Lots of const etc. Andrew Bartlett
* Update the usage for smbgroupedit to document -d for 'description'.Andrew Bartlett2002-07-201-0/+2
| | | | | | I think this one is due to metze. Andrew Bartlett
* Show the account flags in the 'verbose' listing of pdbedit.Andrew Bartlett2002-07-141-0/+2
| | | | Andrew Bartlett
* move opt_machine_pass to keep some compilers happyAndrew Tridgell2002-07-141-1/+1
|
* added useful 'net rpc info' commandAndrew Tridgell2002-07-131-0/+76
| | | | | this also gives a way to distinguish a 'native mode' server from a non-native server. This call will fail for a native mode server.
* added --machine-pass option to net. This allows you to authenticate asAndrew Tridgell2002-07-131-1/+21
| | | | | the current machine account and password. This is useful both for diagnostics and domain leave.
* This makes smbcacls a bit easier to use and debug.Andrew Bartlett2002-07-131-8/+15
| | | | | | | Allow connection in the form of //server/share instead of just \\server\share and show the reason for failure from cli_full_connection(). Andrew Bartlett
* make net join a bit less verboseAndrew Tridgell2002-06-281-1/+1
| | | | these errors happen all the time, so they shouldn't be level 0
* Proper merge of all the working printing stuff from APPLIANCE_HEAD.Jeremy Allison2002-06-281-14/+96
| | | | | Now let's keep this in sync ! Jeremy.
* This commit finally gives us multiple wins server groups. We nowAndrew Tridgell2002-06-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | accept an extended syntax for 'wins server' like this: wins server = group1:192.168.2.10 group2:192.168.3.99 group1:192.168.0.1 The tags before the IPs don't mean anything, they are just a way of grouping IPs together. If you use the old syntax (ie. no ':') then an implicit group name of '*' is used. In general I'd recommend people use interface names for the group names, but it doesn't matter much. When we register in nmbd we try to register all our IPs with each group of WINS servers. We keep trying until all of them are registered with every group, falling back to the failover WINS servers for each group as we go. When we do a WINS lookup we try each of the WINS servers for each group. If a WINS server for a group gives a negative answer then we give up on that group and move to the next group. If it times out then we move to the next failover wins server in the group. In either case, if a WINS server doesn't respond then we mark it dead for 10 minutes, to prevent lengthy waits for dead servers.
* Update cli_full_connection() to take a 'flags' paramater, and try to get aAndrew Bartlett2002-06-253-73/+18
| | | | | | few more places to use it. Andrew Bartlett
* Add a .cvsignore fileAndrew Bartlett2002-06-251-0/+1
|
* Break up samba's object dependencies, and its prototype includes.Andrew Bartlett2002-06-252-0/+3
| | | | | | | | | | | | | | | | Now smbclient, net, and swat use their own proto files - now the global proto.h The change to libads/kerberos.c was to break up the dependency on secrets.c - we want to be able to write an ADS client that doesn't need local secrets. I have other breakups in the works - I will remove the dependency of rpc_parse on passdb (and therefore secrets.c) shortly. (NOTE: This patch does *not* break up includes.h, or other such forbidden actions). Andrew Bartlett
* Support utf8 on the wire for ads ldap. DN's are converted, as well as strings,Jim McDonough2002-06-241-10/+20
| | | | | | | | | | | | | | though it is up to the calling function to decide whether values are strings or not. Attributes are not converted at this point, though support for it would be simple. I have tested it with users and groups using non-ascii chars, and if the check for alphanumeric user/domain names is removed form sesssetup.c, even a user with accented chars can connect, or even login (via winbind). I have also simplified the interfaces to ads_mod_*, though we will probably want to expand this by a few functions in the near future. We just had too many ways to do the same thing...
* Don't use uint. It doesn't exist on some platforms and we don't define it.Jeremy Allison2002-06-211-1/+1
| | | | | Replaced with "unsigned int". Jeremy.
* Cope with the requirement for constant initialisers on some unix C compilers.Andrew Bartlett2002-06-161-1/+1
| | | | Andrew Bartlett
* Kill useless castAndrew Bartlett2002-06-141-2/+2
|
* Patch from ctrlsoft to make the pluggable passdb subsystem use an lp_listAndrew Bartlett2002-06-141-10/+12
| | | | | | | | | | | | | rather than a string when configuring mulitple backends. Also adjust some of the users of get_global_sam_sid() to cope with the fact that it just might not exist (uninitialised, can't access secrets.tdb). More places need conversion. Add some const and remove silly casts. Andrew Bartlett
* Patch (from ctrlsoft <jelmer@nl.linux.org>) to poptify testparm, and theAndrew Bartlett2002-06-141-151/+120
| | | | | | modifications required to suppress the const warnings. Andrew Bartlett
* Latest patch from metze <metze@metzemix.de> to move most of samba acrossAndrew Bartlett2002-06-131-4/+6
| | | | | | | | | | | to using SIDs instead of RIDs. The new funciton sid_peek_check_rid() takes an 'expected domain sid' argument. The idea here is to prevent mistakes where the SID is implict, but isn't the same one that we have in the struct. Andrew Bartlett
* Globally replace 'global_sam_sid' with get_global_sam_sid(), a selfAndrew Bartlett2002-06-071-2/+1
| | | | | | | | | initialising function. This patch thanks to the work of "Stefan (metze) Metzmacher" <metze@metzemix.de> This is partly to enable the transition to SIDs in the the passdb. Andrew Bartlett
* added a 'net ads search' command, similar to 'ldapsearch' but using theAndrew Tridgell2002-06-031-7/+70
| | | | | | | | Samba LDAP code. I have found using 'ldapsearch' rather frustrating, particularly with kerberos authentication. Using 'net ads search' makes it easier to track down ADS problems.
* Add remainder of net rpc file subcommands, and autoselect transport onJim McDonough2002-06-013-15/+142
| | | | net file