Article

dguest's picture
article
Reads:

4227

Score:
2.57143
2.6
7
 
Comments:

0

Customizing an NSL Script for Admin Account Users

Author Info

31 October 2007 - 7:26am
Submitted by: dguest

Problem

A Forum reader recently asked:

"We have a login script that our Marketing department uses, but there are sometimes people who work on our webpage who need an administrative account. Can we adapt the script to work for them as well?"

And here's the response from David Guest ...

Solution

You can't easily tell if the user is going to need the admin privileges or not. So you need to ask them. I would do some thing like this:

Dialog
Class "#32770"
Title "Netzwerkkennwort eingeben"
EndDialog
If %Department eq "Marketing"
     MessageBox -yesno ?Answer "Do you need Administration Access ?"
     If ?Answer eq "Yes"
         SetPlat MarketingAdmin
         Setprompt "Admin Username:"
         Type $Username #1218
         Setprompt "Password:"
         Type $Password #1219
         Click #1
         EndScript
     EndIf
EndIf
Type ?Sysuser #1218
Type ?Syspassword #1219
Click #1
Setprompt "Enter your sign-on variables"
## EndSection: "Login Window"

This uses a directory variable "Department" to determine that the user is in the Marketing department. You may want to use a different variable though - for example, you could try something like:

If $SysUser(system) -In "NAme 1 Name2 Name3 Name4"




User Comments

© 2013 Novell