background image

30

Novell Login Scripts Guide

no

vd

ocx 

(e

n)

  

24

 Ma
rch 20

09

NOTE: 

Commands that work only on DOS or Windows 3.

x

 workstations have not been included. 

These commands include CLS, COMSPEC, DOS VERIFY, MACHINE, NOSWAP, and SWAP. For 
information on using these commands, see the help file that accompanies the Novell

®

 Client

TM

 for 

DOS and Windows 3.

x

 software.

3.1  Login Script Conventions

The following table explains the conventions you should follow when creating login scripts.

Table 3-1   

Login Script Conventions

Convention

Explanation

Minimum login script

No minimum. All types of login scripts are optional. Login scripts can 
vary from one line to many. There are no required commands.

Case

Either uppercase or lowercase is accepted. Exception: identifier 
variables enclosed in quotation marks and preceded by a percent 
sign (%) must be uppercase. See 

Section 3.2, “Using Identifier 

Variables,” on page 31

.

Characters per line

Maximum 512 characters per line, including any variables after they 
are replaced by their values; 78 characters per line (common screen 
width) is recommended for readability.

Punctuation and symbols

Type all symbols (#, %, ", _) and punctuation exactly as shown in 
examples and syntax.

Commands per line

Use one command per line. Start each command on a new line; press 
Enter to end each command and start a new command.

Lines that wrap automatically are considered one command.

Sequence of commands

Generally, list commands in the order that you want them to execute, 
with the following restrictions: 

Š

ATTACH

 commands (NetWare

®

 3 only) must precede related 

MAP

 commands to avoid prompting the user for a username/

password during login (see 

Section 3.6, “ATTACH,” on 

page 39

).

Š

If you use # (see 

Section 3.4, “#,” on page 37

) or @ (see 

Section 3.5, “@,” on page 38

) to execute an external program, 

the command must follow any necessary 

MAP

 commands. If 

sequence is not important, group similar commands, such as 

MAP

 and 

WRITE

 commands, together to make the login script 

easier to read.

Blank lines

Blank lines don't affect login script execution. Use them to visually 
separate groups of commands.

Remarks

Lines beginning with REMARK, REM, an asterisk (*), or a semicolon 
(;) are comments, which don't display when the login script executes 
(see 

Section 3.23, “REMARK,” on page 51

). 

Use remarks to record the purpose of each command or group of 
commands or to temporarily keep certain lines from executing.

Summary of Contents for LOGIN SCRIPTS

Page 1: ...Novell www novell com novdocx en 24 March 2009 AUTHORIZED DOCUMENTATION Novell Login Scripts Guide Login Scripts August 2008 Login Scripts Guide ...

Page 2: ... or import deliverables You agree not to export or re export to entities on the current U S export exclusion lists or to any embargoed or terrorist countries as specified in the U S export laws You agree to not use deliverables for prohibited nuclear missile or chemical biological weaponry end uses Please refer to www novell com info exports for more information on exporting Novell software Novell...

Page 3: ...l Trademarks For Novell trademarks see the Novell Trademark and Service Mark list http www novell com company legal trademarks tmlist html Third Party Materials All third party trademarks are the property of their respective owners ...

Page 4: ...4 Novell Login Scripts Guide novdocx en 24 March 2009 ...

Page 5: ...in Scripts Work with NetStorage 18 1 10 Additional Sources for Login Scripts Information 19 2 Sample Login Scripts 21 2 1 Sample Container Login Script 21 2 2 Sample Profile Login Script 22 2 3 Sample User Login Scripts 22 2 3 1 Sample User Login Script for Mapping Drives 23 2 4 Sample Default Login Script 23 2 5 Samples of Login Script Commands 24 2 5 1 If Member Of Script Sample 24 2 5 2 MAP Com...

Page 6: ...ing Login Scripts 59 4 1 Locating the Problem Statement in the Windows Login Script 59 4 2 Turning Off the MAPROOT Function in Windows 2000 XP 60 4 3 Limitations of Tree Command in Login Scripts 60 4 4 Lowercase Passwords Not Supported When Using the Tree Command in Login Scripts 60 4 5 Other Common Login Script Problems 60 4 5 1 Losing Path Statements after Login 61 4 5 2 Cannot Use the LOGIN and...

Page 7: ... For the latest version of this documentation see the Novell Clients online documentation http www novell com documentation noclienu index html Additional Documentation For documentation on installing and managing Novell Client software see the following documentation Web pages Novell Client v 4 91 for XP 2003 http www novell com documentation noclienu index html Novell Client for Linux http www n...

Page 8: ...8 Novell Login Scripts Guide novdocx en 24 March 2009 ...

Page 9: ...is simply a text file that the login executable interprets and runs line by line When a user successfully logs in to the network one or more login scripts can be executed that automatically set up the workstation environment Login scripts are similar to batch files and are executed by the Novell LOGIN utility You can use login scripts to map drives and search drives to directories display messages...

Page 10: ...and easier to maintain For example if all users need access to the NetWare utilities in the same volume put the search drive mapping to that volume in a single container login script rather than in every user login script Create profile login scripts if several users have identical login script needs Profile login scripts are sometimes thought of as group login scripts Finally in user login script...

Page 11: ...ers ESAYERS and SWILLIAMS only the script for the container they are in OU SALES_PV executes when they log in If the SALES_PV Organizational Unit had no container login script defined no container login script would execute for ESAYERS and SWILLIAMS even though a container login script exists at a higher level Because user SWILLIAMS has no user login script defined the default login script execute...

Page 12: ... can use Novell iManager or ConsoleOne to create login scripts from scratch or from a sample login script that is provided for you Using a sample login script can help reduce syntax errors and thus reduce the time it takes to create login scripts All four types of login scripts use the same conventions commands and variables For more information see Login Script Commands and Variables on page 29 T...

Page 13: ...ject name and context in the Profile field For additional information see Creating a Profile Login Script on page 13 6 To save the login script click OK Creating a Container Login Script 1 Click Roles and Tasks Directory Administration Modify Object 2 Specify the container and context then click OK 3 Click General Login Script 4 Type the login script commands and information in the login script te...

Page 14: ...see Sample Login Scripts on page 21 IMPORTANT Make sure that you edit the sample login script to match the server names directory paths and specifications of your own network For additional information on all login script commands see Login Script Commands and Variables on page 29 4 To save the login script and close the Details dialog box click OK If the login script that you just created was a c...

Page 15: ... they are trustees for Also additional scripts can be run from within the two standard scripts by using the PROFILE command For more information on the PROFILE command see Section 3 21 PROFILE on page 50 In addition to using the Novell Login Window or the PROFILE command you can also assign users to more than one Group object Use the MEMBER OF group identifier variable to execute different parts o...

Page 16: ... 14 1 6 Modifying User Login Scripts from the N Menu In addition to creating User login scripts in Novell iManager or ConsoleOne you can also add user login scripts to User objects from the N menu in the system tray This lets you customize the login script for the user that is currently logged in to the network without running iManager or ConsoleOne IMPORTANT On Linux workstations the ability to e...

Page 17: ... includes a space in its name must be enclosed in quotes 1 8 Understanding How Login Scripts Work with Linux Workstations Novell has been able to port the vast majority of login script functionality over to the Linux platform This means that the login scripts you create in your network will work for both Windows users and Linux users with very little difference in functionality Additionally login ...

Page 18: ...ectory User object in the primary authentication domain are processed These login scripts are the same scripts processed by the Novell Client However because login scripts were designed to be processed by the Novell Client on the user s workstation some of the defined statement types and script variables cannot be processed by NetStorage The following is a list of what login script functions are a...

Page 19: ...TID 10068983 http support novell com cgi bin search searchtid cgi 10068983 htm 1 10 Additional Sources for Login Scripts Information Because login scripts have been used in multiple versions of Novell products over the past 10 years there is a wealth of information about them available in other documentation Here are a few sources to check for additional information Using NDS User Object Propertie...

Page 20: ...20 Novell Login Scripts Guide novdocx en 24 March 2009 This additional information in conjunction with this manual provides you the needed information to construct and troubleshoot login scripts ...

Page 21: ...ripts on page 12 IMPORTANT You must modify these sample login scripts to match the server names directory paths and specifications of your own network 2 1 Sample Container Login Script The container login script should contain any information that applies to all users By using some or all of the commands included in the following sample container login script you might find it easier to plan and c...

Page 22: ...ate a login script for it Then you can assign each user to be a member of that object The following login script shows an example of a profile login script you might create for users in the Profile object ACCOUNTING This profile login script would execute after the container login script had executed For more detailed information about each type of login script command see Login Script Commands an...

Page 23: ...requently For more information on editing user login scripts from the N menu see Section 1 6 Modifying User Login Scripts from the N Menu on page 16 The following sample shows how Takashi included his drive mappings in his User login script MAP F MKTG TOKYO DIGITALAIRLINE COM DATA MAP G MKTG TOKYO DIGITALAIRLINE COM HOME KYAMATO 2 4 Sample Default Login Script The default login script executes the...

Page 24: ...R MYCOMPANY THEN WRITE You are not a member of User IF MEMBER OF GROUP10 MYCOMPANY then WRITE Group 10 is the Best 2 5 2 MAP Command Script Sample The following is a sample of MAP command statements used to map to For more information on these commands see Section 3 18 MAP on page 47 MAP DISPLAY ON MAP DISPLAY ON E FILE_SERVER SYS MAP H FILE_SERVER_SYS MYCOMPANY MAP D FILE_SERVER SYS G FILE_SERVER...

Page 25: ...ECOND WRITE CN IS CN WRITE LOGIN ALIAS CONTEXT LOGIN_ALIAS_CONTEXT WRITE FULL NAME IS FULL_NAME WRITE LAST NAME IS LAST_NAME WRITE LOGIN CONTEXT IS LOGIN_CONTEXT WRITE LOGIN NAME IS LOGIN_NAME IF MEMBER OF USERS MYCOMPANY THEN WRITE USER IS MEMBER OF USERS MYCOMPANY IF NOT MEMBER OF USERS MYCOMPANY THEN WRITE USER IS NOT A MEMBER OF USERS MYCOMPANY WRITE PASSWORD EXPIRES PASSWORD_EXPIRES WRITE REQ...

Page 26: ...UESTER NETWARE_REQUESTER WRITE OS IS OS WRITE OS VERSION IS OS_VERSION WRITE P STATION IS P_STATION WRITE PLATFORM IS PLATFORM WRITE SHELL TYPE IS SHELL_TYPE WRITE SHELL VERSION IS SHELL_VERSION WRITE SMACHINE IS SMACHINE WRITE STATION IS STATION WRITE WINVER IS WINVER 2 5 4 Display Script Sample The following is a sample of how the DISPLAY command can be used in a script For more information see ...

Page 27: ...T TXT FDISPLAY MYCOMPANY 2 5 6 Include Script Sample The following is a sample of how the INCLUDE command can be used in a script For more information see Section 3 16 INCLUDE on page 45 SET SERVER FILE_SERVER INCLUDE FILE_SERVER SYS VOL1 LOGINSCRIPT TXT INCLUDE FILE_SERVER SYS VOL1 LOGINSCRIPT TXT INCLUDE FILE_SERVER SYS VOL1 LOGINSCRIPT TXT INCLUDE FILE_SERVER SYS VOL1 LOGINSCRIPT TXT INCLUDE FI...

Page 28: ...28 Novell Login Scripts Guide novdocx en 24 March 2009 ...

Page 29: ...EAK on page 39 Section 3 8 CONTEXT on page 39 Section 3 9 DISPLAY on page 40 Section 3 10 DRIVE on page 40 Section 3 11 EXIT on page 41 Section 3 12 FDISPLAY on page 41 Section 3 13 FIRE or FIRE PHASERS on page 42 Section 3 14 GOTO on page 42 Section 3 15 IF THEN on page 43 Section 3 16 INCLUDE on page 45 Section 3 17 LASTLOGINTIME on page 47 Section 3 18 MAP on page 47 Section 3 19 NO_DEFAULT on ...

Page 30: ...ability Punctuation and symbols Type all symbols _ and punctuation exactly as shown in examples and syntax Commands per line Use one command per line Start each command on a new line press Enter to end each command and start a new command Lines that wrap automatically are considered one command Sequence of commands Generally list commands in the order that you want them to execute with the followi...

Page 31: ...attributes is identical to common script variables with a few exceptions The eDirectory attribute must be at the end of the string If multiple variables are required they must be in separate strings You must use the actual eDirectory attribute value names You cannot use localized names or nicknames Some common eDirectory attribute names are listed in Section 3 2 Using Identifier Variables on page ...

Page 32: ...logs in For example WRITE Hello LAST_NAME or WRITE Hello LAST_NAME displays the following message on Bob Smith s workstation screen when he logs in Hello SMITH The percent sign is used only within literal text strings that is within quotation marks The semicolon is used to concatenate the literal text string and the identifier variable Using the GREETING_TIME variable displays the time of day If B...

Page 33: ...rver name NETWORK_ADDRESS Internal number assigned by the network specifying where a device can be located in the network cabling system Object Properties property_name You can use property values of eDirectory objects as variables Use the property values just as you do any other identifier variable If the property value includes a space enclose the name in quotation marks To use a property name w...

Page 34: ...ASSWORD_EXPIRES Number of days before password expires REQUESTER_CONTEXT Context when login started USER_ID Number assigned to each user Workstation MACHINE Type of computer IBM_PC etc NETWARE_REQUESTER Version of the NetWare RequesterTM for OS 2 or VLMTM users OS Type of operating system on the workstation OS_VERSION Operating system version on the workstation P_STATION Workstation s node number ...

Page 35: ...n scripts to accomplish Section 3 3 1 Network Connection and Resource Access on page 35 Section 3 3 2 Login Script Execution on page 35 Section 3 3 3 Workstation Environment on page 36 Section 3 3 4 Text File Usage on page 36 Section 3 3 5 Other on page 37 3 3 1 Network Connection and Resource Access 3 3 2 Login Script Execution Action Command Establish a connection between a workstation and a Net...

Page 36: ...x Section 3 24 SCRIPT_SERVER on page 52 Change the order in which n variables are interpreted in the login script Section 3 27 SHIFT on page 54 Action Command Set an environment variable to a specified value Section 3 25 SET on page 52 Set the workstation time equal to the time on the NetWare server that the workstation first connects to This is not available for Novell Client for Linux Section 3 ...

Page 37: ...me Linux or if you have specified NOSWAP on the command line or in the login script you can replace variable with a full directory path beginning with the NetWare volume name Replace filename with an executable file files that end in exe com or bat for example It isn t necessary to include the extension but doing so can speed up the execution of the external program Replace parameter with any para...

Page 38: ...tation memory is available to load the file Command Format path filename parameter Replace path with a drive letter Windows or a valid path name Linux Replace filename with an executable file files that end in exe com or bat for example Do not include the extension Replace parameter with any parameters that must accompany the executable file Examples If you want to start the GroupWise program from...

Page 39: ...ser can press Ctrl C or Ctrl Break to abort the normal execution of the login script NOTE When the BREAK option is ON type ahead keyboard input is not saved to the buffer DOS BREAK ON OFF does the same thing Command Format BREAK ON OFF 3 8 CONTEXT 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...

Page 40: ...r or a full directory path beginning with the NetWare volume name Replace filename with the complete name including the extension of the file that you want to display Example Suppose you put messages in a file called sysnew txt in the sys public messages directory and you want your users to see the messages when they log in on Monday Add the following lines to the container login script IF DAY_OF_...

Page 41: ...T Use EXIT to terminate execution of the login script 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 Section 3 4 on page 37 or Section 3 5 on page 38 followed on the next line by EXIT 3 12 FDISPLAY Us...

Page 42: ...he beep has been sent Command Format FIRE n soundfile Replace n with the number of times that you want this sound to occur Replace soundfile with the name of the sound file that you want to play when this command is executed The sound file variable cannot be used on DOS workstations You can use any wav or platform compatible sound file Examples The following line executes the phaser sound four tim...

Page 43: ...EN GOTO AGAIN The GOTO command looks at the value of X a DOS environment variable If the value of X is less than 9 then X increments by 1 and GOTO loops back to the AGAIN label When X gains the value of 9 the IF THEN test becomes false the GOTO is ignored and the script continues normally 3 15 IF THEN Use IF THEN to perform an action only under certain conditions An example of a conditional statem...

Page 44: ...raps 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 can also be written as EQUALS EQUAL or IS Does not equal can also be written as or as NOT NOTEQUALS Is great...

Page 45: ...l be backed up tonight END An IF THEN statement can include several commands that must be executed if the conditional is true The following example shows two commands that are executed on Tuesdays a WRITE command that displays a message about a staff meeting and an INCLUDE command that tells the login script to process any commands or messages contained in the file sys public update txt IF DAY_OF_...

Page 46: ...ile as a subscript replace path with either a drive letter or a full directory path beginning with the NetWare volume name Replace filename with the complete name including the extension of the text file To execute another object s login script as part of a login script replace object_name with the name of the object whose login script you want to use Examples To execute a text file called script ...

Page 47: ... MAP to map drives and search drives to network directories or to map to eDirectory objects such as cluster enabled volumes If you use MAP to automate drive map assignments during execution of the login script users don t need to map drives every time they log in If you do not want the result of each mapping to be displayed as it is executed add the MAP DISPLAY OFF command at the beginning of the ...

Page 48: ...ter drive path Replace drive with any valid network drive letter local drive letter or search drive number Replace path with either a drive letter a full directory path a Directory Map object or an eDirectory object such as a cluster enabled volume The UNC path should have a backslash and should not have a colons It may have an optional forward slash at the end You can also map to an eDirectory ob...

Page 49: ...olume object s name A Volume object name might conflict with a physical volume name For example object ACCT is an Accounting volume but there is also a physical volume named ACCT Therefore if you prefer to map a drive to the physical volume name use MAP P This is not available for Novell Client for Linux N NEXT maps the next available drive when used without specifying a drive number or letter 3 1...

Page 50: ...eady appears on the workstation screen NetWare Login then waits for a key to be pressed before it executes the rest of the login script Command Format PAUSE 3 21 PROFILE 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 Command Format PROFILE profile_object_name Example To override the profil...

Page 51: ...Name Context 0 WRITE Value 99 SET REGVAL 99 PAUSE EXIT 3 23 REMARK To include explanatory text in the login script 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 IMPORTANT This command and its associated text m...

Page 52: ... workstation s autoexec bat file Where you use SET commands depends upon your individual needs This command does not work in a login script if the DOS workstation s environment is too small In this case you should set the environment size in the CONFIG SYS file After you use the SET command to set a value for an environment variable you can use that variable in other login script commands To inclu...

Page 53: ...hether the Novell Client should attempt to synchronize the workstation time with the primary NetWare server connection after login script processing Windows XP 2003 and Earlier Workstations Time synchronization at the end of login script processing only occurs during a GINA based login to both eDirectory and Windows or during an eDirectory only login when the Clear current connections option is en...

Page 54: ... be unsuccessful Alternatives to Novell Client Time Synchronization For Windows XP 2003 and later workstations that are not part of a domain you can use the Internet Time tab on the Date and Time control panel applet to update the time directly from an NTP based time source You can configure your workstations to update from the same NTP time source that your Novell servers use as their time standa...

Page 55: ...er string wanted or LOOP have to use non conflicting strings commands In the last line IF 2 is followed by closed quotation marks which means If 2 isn t blank With these commands in her login script and assuming a command line login Mary can log in to the primary file server named FS1 using her username MARY as follows LOGIN FS1 MARY WP ACCNTS The parameters in Mary s login command are given the f...

Page 56: ...d Replace tree_name with the name of the eDirectory tree that you want the user to attach to Replace complete_name with the user s complete name Distinguished Name for the eDirectory tree that the user is attaching to The complete name establishes the user s context in the tree If you do not include the complete name the user is prompted for a complete name when the TREE command is executed from t...

Page 57: ...workstation However if you put a semicolon at the end of all but the last WRITE commands the commands all appear as one continuous sentence or paragraph although they might wrap onto additional lines on the workstation s screen Text strings can include the following special characters In addition to the semicolon you can use other operators to form compound strings in other words to join text and ...

Page 58: ...t and the identifier with a semicolon or include the variable in the quotation marks with the text For example either of the following lines displays Hello Smith when user Bob Smith logs in WRITE Hello LAST_NAME WRITE Hello LAST_NAME To make a beep sound occur while the phrase Good morning appears on the screen add the following line to the login script WRITE Good GREETING_TIME 7 ...

Page 59: ...P ERRORS to ON in the login script By setting MAP DISPLAY and MAP ERRORS to ON the errors display often providing clues as to why a certain command did not execute as expected After seeing that the login script performs all map commands without error the MAP DISPLAY and MAP ERRORS parameters can be turned OFF Use the WRITE or MAP commands together with the PAUSE command prior to the script command...

Page 60: ...ated in eDirectory is attempted The NMAS tabbed page on the login dialog that initiated login to the first NDS tree does not control which NMAS sequence is used when the TREE command causes authentication to additional NDS trees If an NMAS method requires collecting a PIN or password from the user the NMAS method user interface appears during login script processing of the TREE command If the init...

Page 61: ...e sure login exe is being swapped out correctly 4 5 4 LOGIN EXE Problems Because the language enabled login exe is so large it must be swapped out before large executables can run capture exe is a good example of an external program frequently called in a login script By default login exe tries to swap to extended memory first then to expanded memory and then to the current drive If writing to a d...

Page 62: ...emporarily delete any TSRs because some have been known to cause login problems Using an ATTACH command to create an attachment to another NetWare 4 1x server in the same tree can also cause unexpected results such as intermittent premature termination of the login script The ATTACH command makes a bindery connection that causes any previous eDirectory connections to that server to be destroyed Us...

Page 63: ...mentation The documentation was updated on the following dates Section A 2 September 21 2007 on page 63 Section A 3 December 23 2005 on page 63 A 1 August 19 2008 Updated the title page in the PDF version A 2 September 21 2007 Added Section 3 22 REGREAD on page 50 Updated Section 3 26 SET_TIME on page 53 Removed outdated TERM command from Chapter 3 Login Script Commands and Variables on page 29 A ...

Page 64: ...64 Novell Login Scripts Guide novdocx en 24 March 2009 ...

Reviews: