To create or modify login scripts and to copy one object's login script into another's, you can use either the NetWare Administrator graphical utility or the NETADMIN text utility. Both procedures are documented in this section.
IMPORTANT: If you are logged in to a server running NetWare 2 or NetWare 3 and that server is in a Directory tree, you must not create or edit a login script using the SYSCON utility. If you do, the changes to that login script will not appear in your Novell Directory Services login script.
The reason is that your Novell Directory Services login script is a property of your User object, while your bindery-based login script is a file in your MAIL directory.
The main difference in creating container, profile, and user login scripts is the object you select to contain the login scripts.
All four types of login scripts use the same conventions, commands, and variables.
The following hints can help you plan effective login scripts. For a description of the commands you can use in a login script, see Login Script Commands and Variables For login script examples, see Examples of Login Scripts
Table 15. Login Script Conventions
| Subject | Convention |
|---|---|
Minimum login script |
No minimum. All four types of login scripts are optional. Login scripts can have only one line or they can have many. There are no required commands for login scripts. |
Case |
Either uppercase or lowercase is accepted. Exception: identifier variables enclosed in quotation marks and preceded by a percent sign (%) must be uppercase. See Identifier Variables |
Characters per line |
150 characters per line is maximum; 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 only 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. WRITE command output displays better if WRITE is repeated at the beginning of each wrapped line. |
Sequence of commands |
Generally, enter commands in the order you want them to execute, with the following restrictions:
|
Blank lines |
Blank lines don't affect login script execution. Use them to visually separate groups of commands. |
Remarks (REMARK, REM, asterisks, and semicolons) |
Lines beginning with REMARK, REM, an asterisk, or a semicolon are comments, which don't display when the login script executes. Use remarks to record the purpose of each command or group of commands. (For examples, see REMARK) |
Identifier variables |
Type identifier variables exactly as shown. For the value of an identifier variable to be displayed on the workstation's screen as part of a WRITE command, you must enclose the identifier in quotation marks and precede it by a percent sign (%). See Identifier Variables |
Use the following instructions to create any of the three user-created types of login scripts (container, profile, or user).
Choose the NetWare Administrator icon from the MS Windows Program Manager or the OS/2 desktop. Using the browser, select the object whose login script you are creating or modifying. For information about moving around in the browser and selecting objects, choose Help from the menu bar. Choose Details from the Object menu. Choose the Login Script page. Enter the login script commands and information into the login script text box. For a description of all login script commands, see Login Script Commands and Variables For login script examples, see Examples of Login Scripts Choose OK to save the login script and close the Details dialog box. If the login script you just created was a container or user login script, you're finished. If the login script you just created was for a Profile object, continue with Step 7. (Profile login scripts only) Using the browser, select the User object that needs to use the profile login script. Choose Details from the Object menu. Choose the Login Script page. Enter the name of the Profile object in the Default Profile field located under the login script text box. You can type in the complete name of the Profile object, or you can choose the browser button next to the Default Profile field to select the Profile object. To save the Profile object name and close the Details dialog box, choose OK. Now you must add the User object as a trustee of the Profile object. Using the browser, select the Profile object. Choose Trustees of This Object from the Object menu. Choose Add Trustee. Enter the name of the User object who is using this Profile object. You can type in the complete name of the User object, or you can choose the browser button to select the Profile object. Make sure the Browse object right and the Read property right are checked, and then choose OK to assign these rights to the User object. The User object is now a trustee of the Profile object and has the rights necessary to run the profile login script
Procedure
Additional Information
Use the following instructions to create any of the three user-created types of login script (container, profile, or user).
At the DOS Prompt, type NETADMIN <Enter>
Choose Manage Objects from the NetAdmin Options menu. Select the object whose login script you want to create.
Select View or Edit Properties of This Object. Select Login Script. If you are editing an existing login script that already contains some commands, continue with Step 6. If this login script is empty, a message appears asking if you want to copy a login script from another object. If you do not want to copy the login script from another object, answer No and continue with Step 6. To copy a login script from another object, answer Yes and select the name of the object whose script you want to copy. Then continue with Step 6. The login script is copied into the login script text box. Enter the login script commands and information in the login script text box. For a description of all login script commands, see Login Script Commands and Variables For login script examples, see Examples of Login Scripts To save the login script, press <F10>. If the login script you just created was a container or a user login script, you're finished. If the login script you just created was for a Profile object, continue with Step 8. (Profile login scripts only) Press <Esc> repeatedly until you return to the browser. Select the User object that needs to use the profile login script. You can either type the object's complete name and press <F10>, or you can press <Insert> to browse through the Directory tree and choose the name. Select View or Edit Properties of This Object. Select Memberships. Select the Profile field and press <Insert>. Enter the name of the Profile object in the box that appears. You can either type the object's complete name and press <F10>, or you can press <Insert> to browse through the Directory tree and select the name. Press <F10> to save the changes. Now you must add the User object as a trustee of the Profile object. Return to the Manage Objects menu. Through the browser, select the Profile object. Press <Insert> to browse through the Directory tree and choose the name. Select View or Edit the Trustees of This Object. Select Trustees. To add the User object as a trustee of this Profile object, press <Insert>. Enter the name of the User object who needs to be a trustee of this Profile object. You can either type the object's complete name and press <F10>, or you can press <Insert> to browse through the Directory tree and choose the name. Select [All Properties Rights]. To add the user as a trustee and grant the default property right, press <Enter>. The User object is added as a trustee of the Profile object and is given the Read right to all of the Profile's properties. Now you must assign the Browse object right to the User object. Enter the name of the User object. You can either type the object's complete name and press <F10>, or you can press <Insert> to browse through the Directory tree and choose the name. Choose [Object Right]. To grant the default object right, press <Enter>. The User object is given the Browse object right. The User object now has all rights necessary to use the Profile object's login script. To exit NETADMIN, press <Esc> until you get to the confirmation prompt, and then select Yes.
Procedure
Additional Information
| For more information about | See |
|---|---|
Creating a Profile object |
|
Examples of login scripts |
|
Login script commands and variables |
|
Using the NETADMIN utility |
NETADMIN in Utilities Reference |
Use the following instructions to copy all or part of a login script and paste it into another object's login script.
Choose the NetWare Administrator icon from the MS Windows Program Manager or the OS/2 desktop. Using the browser, select the object whose login script you want to copy. For information about moving around in the browser and selecting objects, choose Help from the menu bar. Choose Details from the Object menu. Choose the Login Script page. In the login script text box, highlight the text you want to copy. Press <Ctrl>+<Insert> to copy the highlighted text. The highlighted text has been placed in clipboard memory and can be pasted into another login script. To save the login script and close the Details dialog box, choose OK. Using the browser, select the object whose login script you want to paste the copied text into. Choose Details from the Object menu. Choose the Login Script page. In the login script text box, place the cursor where you want the copied text to appear. Press <Shift>+<Insert> to paste the copied text into the login script. To save the login script and close the Details dialog box, choose OK. Use the following instructions to copy all or part of a login script and paste it into another object's login script.
At the DOS prompt, type NETADMIN <Enter>
Choose Manage Objects from the NetAdmin Options menu. Select the object whose login script you want to copy.
Select View or Edit Properties of This Object. Select Login Script. In the login script text box, place the cursor at the beginning of the text you want to copy and press <F5> to mark the beginning of the text. Use the arrow keys to move to the end of the text you want to copy. As you move the cursor, text in the login script is highlighted. This highlighted text will be copied by first deleting it here, then reinserting it here, and then inserting it into the new login script. To delete the text from the login script, press <Delete>. Although you have deleted the text, the text has been placed in a clipboard memory and can be retrieved. To insert the text from the login script, press <Insert>. The deleted text has now been restored to your login script. A copy of the text still resides in the clipboard memory, so you can paste it into another object's memory. To exit the login script, press <Esc>, and select No when asked if you want to save the changes you made. Return to the browser screen. Select the object whose login script you want to paste the copied text into. You can either type the object's complete name and press <F10>, or you can press <Insert> to browse through the Directory tree and choose the name. Select View or Edit Properties of This Object. Select Login Script. In the login script text box, place the cursor where you want the copied text to appear. To paste the copied text into the login script, press <Insert>. To save the changes, press <F10>. Use the following instructions to print a login script.Procedure
Copying a Login Script Using NETADMIN
Prerequisites
Procedure
Printing Login Scripts
Prerequisites