|
PassAid Custom Pre-Connection ProgramsGenerally, PassAid will make connections to all selected databases with the same user ID and password and change the password to the same new value. Sometimes, passwords and/or user IDs in your databases are not the same, but they follow a certain pattern or you want new passwords to be different from each other but follow a pattern. If you are content with certain vulnerabilty of passwords following patterns, and you can write a program that, given a database's net service name and a common user ID and password, will produce a user ID, a current password and a new password for that database, then PassAid can be configured to invoke your custom program before connecting to each database. The only function and purpose of such custom program is to produce a login ID and/or current and new password to be used for connection to the next database. Normally, a custom pre-connection program will only perform some more or less simple string manipulations to produce the required values; however, it can use any other means, like accessing other documents or databases where passwords are stored. A custom program can be a batch file, a Visual Basic script, a Java class, etc. It will be called by and executed in PassAid session environment, therefore it cannot be a 32-bit GUI application. You have to provide the exact command when configuring PassAid. The command is a call to your custom program (a fully qualified executable file name), optionally followed by parameters. PassAid will execute the command before connecting to each of the selected databases. PassAid will check the command's exit code and will only connect to the next database the exit code was 0. When the custom program is called, PassAid is not connected to any database. A common user ID is always part of PassAid configuration. When you direct PassAid to change passwords, even when using a custom program, you are still required to enter a common password. Values of these common user ID and password, along with the net service name of the database to which the next connection will be made, are available to the custom program through environmental variables x_loginid, x_old_pwd, and service_name. Value of x_old_pwd is already enclosed in double quotes. The goal of the custom program is to produce correct values for any or all of the following parameters to be used when connecting to the next database: the user ID, the current password, and the new password. To make the new values visible to PassAid, the custom program must assign them to variables x_loginid , x_old_pwd, and x_new_pwd respectively, by writing the assignments to a temporary file whose name is stored in environmental variable TMPFILE2, in a form <variable>=<value>. Again, the values of x_old_pwd and x_new_pwd must be enclosed in double quotes. PassAid will read the file and will only take into account new values for x_loginid, x_old_pwd, and x_new_pwd and use them on the next database. Suppose, in a set of QA databases whose service names begin with a letter Q, the user ID that you want to use for connection is the same for all databases, the current password in each database is a concatenation of the user ID, a dollar sign $, and the last three characters of the database service name, and the new password should be a concatenation of the first four characters of the user ID, an underscore _ and the database service name. A custom program that produces a user ID and passwords for each database (in a form of Windows XP batch file) may look like this:
Assuming this
program is located in c:\my_programs\PassAid directory,
your PassAid custom command that uses this program
should be Carefully debug your custom program before using in with PassAid. |