NAME bindedit -- batch editor for NetWare 2.x/3.x bindery SYNOPSIS bindedit -r|-c|-w [-t #,#,...] [-x sdio] [] bindread -r|-c [-t #,#,...] [-x sdio] [] DESCRIPTION Bindedit will read the bindery and print it out to stdout or (-r option) or write stdin or to the bindery (-w option). The -c option will merely check the potential input file for -w for errors; processing it and reprinting it to the standard output. You can check that bindedit is parsing your file correctly by using diff on your original input file and the output produced with -c. Background: The NetWare bindery is essentially a database in which all network resources and clients for a particular server are identified. Each resource or client is inserted into the bindery as an _object_. Information about this object is stored in its _properties_, or more specifically, in the data fields belonging to its _properties_. Objects have a name, which may be up to 47 characters long, a type (see below), a flag indicating whether they are static or dynamic, and a security level. Some of the object types are: 0 unknown 1 user 2 user group 3 print queue 4 file server 5 job server 6 gateway 7 print server 8 archive queue 9 archive server 10 job queue 11 administration 36 remote bridge server 71 advertising print server 312 schema object Static objects are kept in the bindery until they are removed by someone. Dynamic objects are removed from the bindery when the system is rebooted. The object's security level is kept in a byte which is divided into two nybbles. The high-order nybble is the security level required to write the object; the low-order nybble is the security required to read the object. The security levels are as follows: 0 anyone (even those not logged in) 1 logged (logged in objects) 2 object (objects that have logged in with this object's name, type and password) 3 supervisor (or object with security-equivalent to supervisor) 4 netware (netware operating system only) An object may have one or more properties, which hold data relating to the object. A property name may be up to 15 characters long. A property is also be static or dynamic (with the same effect as for objects). Properties are either _set_ properties or _item_ properties, referring to the type of data (if any) that a property holds. The data for a set property is a list of other objects in the bindery. An item property simply has a string of bytes as its data. Each property also has a security byte, which works the same way as the object security byte. Options: -t #,#,... Restrict yourself to reading/writing only the types listed. (The default is to read/write all types.) -x sdio Restrict yourself to reading and writing only objects and properties with the given flags (the default is all four). The flags are s static--a permenant bindery entry d dynamic--removed from the bindery on reboot i item data--property data o set (object) data--lists of bindery objects as data File Format: All objects are in brackets "[]"; the left bracket must be at the beginning of a line. The format is [name/type, staticflag, security] or [name/type, delete] or [name/type] The first paradigm above is for adding an object to the bindery. Name is the object name, which must be 48 characters or less. This is case sensitive, and NetWare generally wants to see names in upper case. Type is an integer indicating the object type (see the list above under the -t option for some possible types). Staticflag is either "static" or "dynamic", and indicates which flag the object has. Security is the security byte of the object in hexidecimal. If "delete" is given instead of the staticflag and security, the object will be deleted from the bindery. If just the name and type are given, no action will be taken on the object itself; this simply indicates the object to be used for following property additions/deletions. Properties must begin at the beginning of a line, and are in the form property-name=setflag, staticflag, security, data or property-name=delete The first instance adds a property to the most recent object mentioned. Setflag is "set" or "item". Staticflag is "static" or "dynamic". Security is the security byte in hexidecimal. For a set property, the data consists of comma-separated objects. An object is defined by giving its name followed by a slash and the object type. For example: GROUPS_I'M_IN=EVERYONE/2, WP/2, LOTUS/2 Item properties may have their data given either in hex or in ASCII. ASCII data starts with a double quote and continues until the next double quote. Double quotes and backslashes within the data are escaped with a preceeding backslash. Hex data is given as hex digits, with optional whitespace between any bytes. These two forms can be mixed, as in SOMEPROP="Some name" 00 1f2b 00ec "C:\\DOS" 00 12 2c 1f e0 If "delete" is the only word after a property name and equals sign, the property will be deleted from the most recently mentioned object. If a property is to be changed, it must be deleted first and then added again. Bindread is the same as bindedit but with the -w switch disabled for safety. It can still be quite useful for debugging bindery problems. RETURN VALUES 0 no errors 1 bindery or data error 2 argument error VERSION v1.0 (93.10.12) Copyright 1993 by Fluor Daniel, Inc. AUTHOR Curt Sampson email: a09878@giant.rsoft.bc.ca Fluor Daniel 1444 Alberni Street Tel: 604 691 5458 Vancouver, B.C. CANADA Fax: 604 687 6130 V6G 2Z4 LICENCE INFORMATION This program is free software; you may redistribute it and/or modify it under the terms of the GNU General Public Licence as published by the Free Software Foundation; either version 1 or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; with even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public Licence for more details. You should have received a copy of the GNU General Public Licence along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave., Cambridge, MA 02139, USA. BUGS This program has probably not been tested enough. It does make it rather easy work to go and corrupt a server's bindery. Bindedit has no cognizance of NetWare Name Service or domains. This means that it may or may not damage your domain set up, if you have one, depending on which objects you modify. This may be fixed in a future version. If printable stuff stretches across more than one segment, an ending quote and a starting quote will be printed between segments. If bindedit sees a backslash in the input of a property data string, it always takes it as a literal for the next character, even if the next character is not a double quote or a backslash. The object type numbers should probably be given and printed in hexidecimal, not decimal, as the former seems a more common method of specifying object types. The program currently ignores the -x flags when writing to the bindery. NetWare ignores any objects in the SECURITY_EQUALS property after the 32nd one.