SCRIPT v MT-1.00 ================ (Mar 13, 1997) DISCLAIMER ---------- THIS PRODUCT IS SUPPLIED "AS IS". THE AUTHOR DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE WARRANTIES OF MERCHANTABILITY AND OF FITNESS FOR ANY PURPOSE. THE AUTHOR ASSUMES NO LIABILITY FOR DAMAGES, DIRECT OR CONSEQUENTIAL, WHICH MAY RESULT FROM THE USE OF THIS PRODUCT. Introduction ------------ Login scripts in NetWare 4 are stored as separate files in the hidden SYS:_NETWARE directory, as part of the NDS database files. Using a NetWare 4-aware backup system you can easily backup and restore all NDS information. However, it is often not easy to restore just the login scripts or a particular login script. This is where SCRIPT comes in. SCRIPT is a pair of DOS command-line utilities (xSCRIPT and iSCRIPT) that can help you you to backup and restore NDS login scripts. xSCRIPT allows you to extract any NDS (such as container or a user) login script and writes it to a text file. Later on, you can use iSCRIPT to import the text file back into NDS. Notes ----- 1. You cannot use a wildcard to specify object names from which to extract login scripts. We have given this some serious considerations during the design stage and decided against it: by allowing wildcards, one needs to automate the output filename generatation. There is never a good naming standard that everyone likes . Also, there is the problem of identifing which file is for which object. Things just get too complex. 2. It seems NDS uses a NULL character to indicate it is the end of a streams (text) file for login scripts. Also, NDS stores the scripts as "binary" files where there is only a line-feed and no carriage-returns. However, text files created under DOS (such as using EDIT) has LF/CR at the end of each line. Therefore, when you import the file into NDS, iSCRIPT has to perform some conversion. When trying to track the number of bytes transferred, it is often difficult to correctly report this number, depending on if the file was created using (say) EDIT or using xSCRIPT. Every effort has been put into SCRIPT to have them report the correct information, and provide explanations where inconsistency is found. You should *always* check the content of the text file vs that in NDS just to be on the safe side. 3. Just to make things easier, SCRIPT requires you to specify the NDS object names using a full NDS path, and not a relative path (ie relative to your current context). 4. There is a small file size anomaly with iSCRIPT that we are still working on to address. Let's say you have a login script that is 100 bytes in size. You used iSCRIPT to import a new script that is only 80 bytes in size. The resulting NDS file size is still 100 bytes, howerver, LOGIN and other utilities (such as NETADMIN) will see only the first 80 bytes (ie the new script). If you modified the script and saved it using a NetWare utility (such as NETADMIN), the file size will be set correctly. This is a harmless issue. The only down side is that some extra disk space is being taken up. We are working on this. 5. If you give a typeless name to either the xSCRIPT or iSCRIPT program, you may see a container name being referenced as CN= in a message. Not to worry. This is purely a cosmetic issue. It will be corrected in the next release of SCRIPT. Installing SCRIPT ----------------- No special installation steps or program need to be used. Simply copy the iSCRIPT and xSCRIPT files to SYS:PUBLIC of your servers. You must have the Unicode files for the country code and code page that your workstation use available in the respective NLS directories, for example, SYS:PUBLIC\NLS. Should you install the SCRIPT utilities into a different directory, you may need a search path to the directory where the unicode files are located. Running SCRIPT -------------- xSCRIPT | -------- You can run xSCRIPT with the following command-line parameters: xSCRIPT [-o objectname] [-v] [-f filename] [-q] [-c] where "-o" specifies the name of the NDS object from which to extract the login script information. This name is an absolute pathname (ie always relative to [Root]). You can use typeless names. "-v" will display the login script to the screen, rather than writing to a text file. However, if -f is also specified, the file *will* be created. -q overrides -v. "-f filename" specifies the name of the text file to which the login script will be written to. The file is *not* overwritten or appended to if it exists. A filename of "/" has the same effect as using the -v option. If you specified the -v option on the command line but not -f, you will not be prompted for the filename. You can specify both -v and -f at the same time. This will cause the login script to be displayed on the screen *and* written to the file. "-q" will suppress many informational messages. Good for batch file operation. Overrides the -v option. "-c" specifies continuous scroll on display. Otherwise, pause at the end of each displayed screen. Note: None of the above parameters are case sensitive. ---- For example, to extract the login script from the .OU=Testing.O=Earth container and store the script in a file called LOGIN.SCR, the xSCRIPT command syntax is: xSCRIPT -o .testing.earth -f login.scr -q or xSCRIPT -o .ou=testing.o=earth -f login.scr -q or xSCRIPT -o testing.earth -f login.scr -q will work just as well. Special Switch for xSCRIPT -------------------------- When an User, Organization, or Organizational Unit object is created, no stream files are created for the login script. However, when a Profile object is created, an empty stream file consisting of five (5) NULLs is created. If you edit (say) the User object's login script using NETADMIN, even if you leave it empty, a stream file is created, containing one (1) byte -- a NULL character. However, this does not happen with NWAdmin (the Windows utility). xSCRIPT tries to determine these situations in order to give an accurate error message, if encountered. However, Novell may change the rules at any time. Therefore, there is a "-BYPASS" command-line switch that you can use (not case sensitive), if you know there is a login script for an object, but xSCRIPT tells you otherwise. -------- iSCRIPT | -------- You can run iSCRIPT with the following command-line parameters: iSCRIPT [-o objectname] [-f filename] [-q] [-c] where "-o" specifies the name of the NDS object whose login script will be replaced. This name is an absolute pathname (ie always relative to [Root]). You can use typeless names. "-f filename" specifies the name of the text file from which the login script will be read. "-q" will suppress many informational messages. Good for batch file operation. "-c" specifies continuous scroll on display. Otherwise, pause at the end of each displayed screen. Note: None of the above parameters are case sensitive. ---- For example, to import the login script in a file called LOGIN.CR into the .OU=Testing.O=Earth container, the iSCRIPT command syntax is: iSCRIPT -o .testing.earth -f login.scr -q or iSCRIPT -o .ou=testing.o=earth -f login.scr -q or iSCRIPT -o testing.earth -f login.scr -q will work just as well. Configuring SCRIPT ------------------ n/a Registration ------------ Two variations of SCRIPT are available. The version included here is a Freeware version. In the Freeware version of iSCRIPT, the -c and -q switches are diabled; the Freeware verson of xSCRIPT has the -bypass, -c, -f, -q, and -v switches disabled (ie the Freeware version will only display the login script to the screen). You are granted an unlimited usage at no cost. However, you are not allowed to sell or package this utility as part of another software package or service contract. Bottom line: you can not make money using this Freeware version. All standard Freeware limitation applies. Should you find the need, a registered version is available for $50US. This will be a NETWORK license, limited to ONE NDS TREE. This license does not allow you to resell SCRIPT or to include it as part of another software package or service contract. Special site agreements for multiple trees and service providers are available. Although the license does not grant you the right to resell the program (i.e. for a profit; but you can charge the customer a service charge for your time). If you are a service provider, you can register copies on behave of your customers (by providing your customer's mailing information -- this is used only for tracking purposes). At the same time, we ask you to send us a separate email indicating that you are registering on behave of your customer and inciate in this email if further software upgrade (free or for a charge) be send to you or the customer directly, and an email address for that purpose. The registeration can be performed via CompuServe (!GO SWREG) or via FAX. If you can not register via CompuServe, you can FAX a Purchase Order to (+1) 905-886-2534. Canadian orders is $67.50 CDN plus GST. All other countries, please remit in US funds. Other Information ----------------- iSCRIPT and xSCRIPT are written in C using Microsoft C optimizing compiler and Novell's Client SDK v1.0e. Some string manipulating routines are from the CXL library. Revision History ---------------- Feb 23, 1997, Version MT-0.90Beta. First beta code available for testing. Mar 04, 1997, Version MT-0.92Beta. Fixed up "chars left over" in read buffer problem on large login scripts. (xSCRIPT) Mar 13, 1997, Version MT-1.00. Released.