Novell Cool Solutions

Customizing an NSL Script for Admin Account Users



By:

October 31, 2007 8:26 am

Reads:4,502

Comments:0

Score:Unrated

Print/PDF

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"
0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.
Loading...Loading...

Categories: Uncategorized

0

Disclaimer: This content is not supported by Novell. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.

Comment

RSS