Here is what I do and I have 10 clients running the same project, each that do slightly different things.
Configure the project to use a generic login, say [quote]it_ScadaGeneric[/quote]
In a script module, mine is named Startup, place the following code.
# This definition is for switching the SCADA user name.
# Note: This really only switches the representative login.
# It does not change the OSUser login, which is what
# we base all dynamic properties off of.
# Import the required definitions.
from system.tag import getTagValue
from system.security import switchUser
# Get the OSUserName from the system tag set.
osUser = getTagValue("[SYSTEM]Client\User\OSUsername")
# Lookup to see if the userName begins with 'it_ScadaUser'.
# This is done since we use SCADA based logins similar to 'it_ScadaUserXX'
# Where XX is a number 01, 02, 03, ...
# We don't want to switch the user if it is not a SCADA generic, since it
# will raise an ActiveDirectory wrong password error.
if( osUser.find("it_ScadaUser") != -1 ):
#---END of switchSCADAUser() DEFINITION
Finally in a client startup script, make a call to the above definition.
# Switch the username
This changes the Ignition user name to what the operating system user name is. This may not be directly what you want, but it should get you started.