Novell Login-Script-Befehle

Oft gebraucht, aber im Ernstfall nie zur Hand, weil in der Dokumentation zu tief verborgen - Hier ist eine aktuelle (NetWare 6.5/OES2) Liste aller verfügbaren Novell Login-Script-Befehle:

Befehl

Befehl mit Parameter(n)
Beispiel(e)

Beschreibung

#

# [path] filename [parameter]

# sys:login\start.exe

Use the # command to execute a program that is external to the login script. The # command executes an external program and waits until it is finished running before continuing with other login script commands.

@

@ [path] filename [parameter]

@ sys:login\start.cmd

Use the @ command to execute a program that is external to the login script and then continue with the script (similar to the Startup group). Use the @ command instead of the # command to run an external program from a login script if that external program will remain open for any length of time. Otherwise, the login script will remain open until that external program is closed. (Login scripts cannot be edited while they are open.)

ATTACH

ATTACH server [/username [;password ]]]

ATTACH fs3

Establishes a connection between a workstation and a NetWare server. If the server is not in the current tree, a bindery connection is made. In networks running NetWare 3 or earlier versions, use the ATTACH command to connect to multiple file servers. In NetWare 4 and later, users no longer need to attach separately to multiple servers and do not need to use the ATTACH command. If users want to connect to multiple trees, use the TREE command

BREAK

BREAK on | off

Use BREAK ON to allow the user to terminate execution of the login script. The default is BREAK OFF. If BREAK ON is included in a login script, the user can press Ctrl+C or Ctrl+Break to abort the normal execution of the login script. When the BREAK option is ON, type-ahead keyboard input is not saved to the buffer.

CLS

CLS

Clears the character-display during a Command Line / DOS Login.

COMSPEC

COMSPEC=[path ]command.com

Used to specify the directory where DOS and the DOS command processor (COMMAND.COM) is stored. COMSPEC is originally set when DOS is booted. It must be reset after you log in to change the location that COMMAND.COM loads from while you're in the network.

CONTEXT

CONTEXT context

CONTEXT .support.berlin.geotek

Use CONTEXT to set a user's current context in the eDirectory tree. Similar to the CX utility in DOS, you can use a complete name to move down through the context, or you can use periods to move up toward the root of the tree. However, CONTEXT does not support all options that the CX workstation utility does; CONTEXT only sets the context.

DISPLAY

DISPLAY [path] filename

DISPLAY sys:public\news.txt

Use DISPLAY to show the contents of a text file when the user logs in.When you use DISPLAY, all characters in the file, including any printer and word processing codes, appear. This command works best with an ASCII file. To display only the text and suppress codes, use FDISPLAY.If the given path does not exist or if the file is not found, no error message appears on the screen when the user logs in.

DOS BREAK

DOS BREAK [ON|OFF]

DOS BREAK is used to set the [CNTRL][Break] checking level for DOS. If DOS BREAK is set to ON, you can terminate a program (other than the login script) by pressing [CNTRL][Break]. (This command is different from the BREAK command that allows termination of a login script.)

DOS VERIFY

DOS VERIFY [ON|OFF]

DOS VERIFY is used to verify that data written to a local drive is not written to a bad sector and can be read without an error. Only used for DOS Logins.

DRIVE

DRIVE [drive |*n]

DRIVE T:

Use DRIVE to change the default drive while the login script is executing.If this command is not included in the login script, the default drive will be set to the first network drive, which is often assigned to the user's home directory upon login.If you don't want the default drive to be the first network drive, map a drive in the login script to the directory you want to be the default; then use the DRIVE command to change the default drive.Instead of specifying a drive letter such as F: or G:, you can use an asterisk followed by a number n to represent the nth network drive (for example, *3). This allows drive letters to reorder themselves automatically if previous drive mappings are deleted or added.

EXIT

EXIT

IMPORTANT: You cannot use EXIT in a login script to stop the login script and execute a program. EXIT only terminates the execution of the login script. If you want to execute a program after exiting the login script, you must use one of two commands: # or @ followed on the next line by EXIT.

FDISPLAY

FDISPLAY [path] filename

FDISPLAY sys:login\start.exe
FDISPLAY f:\daten\start.exe

Use FDISPLAY to show the text of a word processing file when the user logs in.To display both the text and the printer and word processing codes of a file, or to display an ASCII file, see DISPLAY.When you use FDISPLAY to display a word processing file, the text is filtered and formatted so that only the text is displayed. FDISPLAY will not display tabs. If the given path does not exist or if the file is not found, no error message appears on the screen when the user logs in.

FIRE
FIRE PHASERS

FIRE n [soundfile]

FIRE 4
FIRE 3 sound.wav
FIRE %variable

FIRE or FIRE PHASERS emits a long beep or a phaser sound. Use this command to generate the phaser sound whenever a user logs in. Use FIRE or FIRE PHASERS with the IF...THEN command to make the sound execute a different number of times depending on the circumstances of the login.

GOTO

GOTO label

START:
...
IF <X> < "4" THEN GOTO START

Use GOTO to execute a portion of the login script out of the regular sequence. Set BREAK ON in your login script before experimenting with GOTO loops so that you can break out of a login script if necessary. Do not use GOTO to enter or exit a nested IF...THEN statement. This usage causes problems for the program.

IF...THEN

IF conditional [AND|OR [conditional]] THEN


IF DAY_OF_WEEK="MONDAY" THEN
WRITE "Montag"
ELSE
WRITE "kein Montag"
END

 

Use IF...THEN to perform an action only under certain conditions. The following syntax rules apply:

  • Use AND or OR to include two or more conditionals in an IF...THEN statement.
  • Values of conditional statements must be enclosed in quotation marks.
  • Values of conditional statements are compared with the assumption that the values are characters, not numeric values. The value of 21, therefore, would be considered greater than the value of 100 when comparing these two characters. To ensure the system properly calculates numeric values instead of character values, use the VALUE modifier in the IF...THEN statement.
  • The ELSE statement is optional.
  • IF, ELSE, and END must be on separate lines. THEN does not need to be on a separate line.
  • If you include a WRITE command as part of the IF...THEN command, the WRITE command must be on a separate line.
  • IF...THEN statements can be nested (up to 10 levels). However, GOTO should not be used in a nested IF...THEN statement to enter or exit from the body of an IF...THEN statement.
  • If your IF...THEN statement consists of only one line, you do not need to include END even if that line wraps. If your IF...THEN statement must be on more than one line (for example, if you used ELSE or WRITE, which must be on separate lines), you must include END.

Six relationships are possible between the elements of an IF...THEN statement. Represent these relationships with the following symbols:

  • = Equals < > Does not equal
  • > Is greater than
  • >= Is greater than or equal to
  • < Is less than
  • <= Is less than or equal to

INCLUDE

INCLUDE [path]filename | edir_object_name

INCLUDE sys:login/ext.txt
INCLUDE .script.berlin.geotek

Use INCLUDE to execute independent files or another object's login script as a part of the login script currently being processed. These subscripts can be text files that contain valid login script commands (any of the commands explained here) or login scripts that belong to a different object you have rights to. The INCLUDE command executes the login script commands contained in the subscript. It does not display the text of the subscripts. INCLUDE nesting is limited only by available memory. In DOS, however, the maximum number of subscript files that you can nest is 10.

LASTLOGINTIME

LASTLOGINTIME

Use LASTLOGINTIME to display the last time the user logged in.

MACHINE

MACHINE name

MACHINE compaq_ps

MACHINE is used to set the DOS machine name (such as IBM or EDIT_ROOM) of the workstation. The MACHINE command is necessary for some programs (such as NETBIOS) written to run under PC DOS. (rarely used)

MAP

MAP [[options]|[parameters][drive:=path]

MAP F:=SYS:
MAP *1:=SYS:PUBLIC;

Use MAP to map drives and search drives to network directories or to map to eDirectory objects such as cluster-enabled volumes.

Instead of specifying drive letters such as F: or G:, you could use an asterisk followed by a number n to represent the nth network drive. For example, if the first network drive is F:, then using MAP *3:= would assign H: (1 2 3 = F G H). Or, if the first network drive is D:, then using MAP *4:= would assign G: (1 2 3 4 = D E F G). This allows drive letters to reorder themselves automatically when local drives are removed or added or when the first network drive is changed. This also allows users to log in from workstations with a different number of local drives than their regular workstation.

You can map a local drive (usually A: through C:) to a network directory, but you cannot access the local drive until you remove the network drive mapping. Do not map over the local drive containing the Windows directory.

NO_DEFAULT

NO_DEFAULT

Use NO_DEFAULT in a container or profile login script if you do not want the default user login script to run and you do not want to create any user login scripts. It is good practice to globally specify this command so that effective mappings are more consistent!

PAUSE

PAUSE

Use PAUSE to create a pause in the execution of the login script. If you include PAUSE, the message Strike any key when ready... appears on the workstation screen. NetWare Login then waits for a key to be pressed before it executes the rest of the login script.

PROFILE

PROFILE edir_profile_object

PROFILE .usrprofile.berlin.ibm

Use PROFILE in a container script to set or override a user's assigned or command line-specified profile script. This is useful when defining a group profile.

REMARK
REM
*
;

REM comment

; Das ist ein Kommentar

To include explanatory text or to keep a line from being executed during testing, begin a line with REMARK, REM, an asterisk (*), or a semicolon (;). Any text that follows these symbols is ignored when NetWare Login executes the login script. Remarks do not appear on the screen.

If a remark is several lines long, begin each line with the remark keyword

SCRIPT_SERVER

SCRIPT_SERVER server

SCRIPT_SERVER fs1

NetWare 2 and NetWare 3 users can use SCRIPT_SERVER to set a home server where the bindery login script is read from. It has no effect on NetWare 4 and later networks.

SET

SET name="value"

SET PATH="c:\oracle\bin\""
SET USR="USER1"

Use SET to set an environment variable to a specified value.

When you use SET in a login script, you must include quotation marks (" ") around values.

If a variable is set to a path that ends in a backslash and quote (\"), these two characters are interpreted as an embedded quote preceded by an escape character. To avoid this problem, use two backslashes before the ending quotes (\\").

With newer Novell Client and windows versions, the environment values are transferred to the parent environment, that is, the variables being set are can be used even after the user has successfully logged in!

SET_TIME

SET_TIME ON|OFF

Used to set the workstation time equal to the time on the NetWare server that the workstation first connects to. If you set SET_TIME to OFF in the login script, the workstation time does not update to the server's time. Default: ON

SHIFT

SHIFT [n}

SHIFT 2

Use SHIFT to change the order in which %n variables are interpreted in the login script. SHIFT allows users to enter login parameters in any order. You can shift up to 10 login script variables from %0 to %9. The default is SHIFT 1

SWAP

SWAP [path}

Used to move the LOGIN utility out of conventional memory into higher memory (if available) or onto the disk. This allows execution of a # command and LOGIN at the same time. Only used with LOGIN.EXE under DOS.

TERM

TERM nnn

TERM 4

Used in a login script to stop the script execution and return the given error code. Replace nnn with an error level. between 000 and 999

Be sure to put this command either at the end of the login script or at a point within the script where you intend execution to stop. Do not nest the TERM command in the login script.

If you add TERM to a container login script, it prevents other profile or user login scripts from running. If you put TERM in a profile login script, it prevents the user login script from running.

TREE

TREE tree_name[/complete_name[;password]]

TREE ibm/.meier.ibm;geheim

The TREE command is used attach to another eDirectory tree in order to access its resources.

It changes the "focus" of the login script so that all eDirectory object references in subsequent script commands (for drive mappings, print captures, etc.) apply to the eDirectory tree specified in the TREE command. You can include multiple TREE commands within a login script,

WRITE

WRITE "[text][%identifier]" [;][identifier]

WRITE "C:\login\test.txt"
WRITE "Hello, %LAST_NAME"

Use WRITE to display messages on the workstation screen when a user logs in to the network. Text that you want to display must be enclosed in quotation marks (" ").

\r Causes a carriage return
\n Starts a new line of text
\" Displays a quotation mark on the screen
\7 Makes a beep sound