Copy Security
Bobbie C. Moreland
Sr. Technical Architect
Baylor Health Care System
Below find documentation and links to 2 scripts, secunld.sh and secload.sh, that will copy security from one productline to another. Both productlines should be in the 7.0.8 environment.
As noted in the instructions, the scripts need to be modified to fit your environment.
Note: I have used slightly modified versions of the secunld.sh and secload.sh scripts to copy security from a productline in the 7.0.8 Environment to one in a 7.3.3 environment. I did it by not loading the locale and usercnv tables, and also by adding an empty column to the end of the USER csv file.
The standard disclaimers apply. Use at your own risk. Run on a test system first. Make backups of affected systems before running.
As of Environment version 7.3 you can use the following Lawson utilities to copy security:
- secdump
- secload
- bldsecdict
- Logon as Lawson Administrator to the server that you are going to copy the security from.
- Turn off security:
lawsec off
- Edit secunld and make the following changes to reflect your environment:
- Edit the line under the section that says
Need to set correct Environment variables within script for Lawson Environment variables are used within script, to make moving easier
Put in the path to your environment configuration file
. /lawson/lawson/lawson.env
- Edit the line under the section that says
Set the working directory to output the security data file extracts within validate that script variables are set within the script
Put in a valid directory path.
SECDIR=/Directory_Path
- Page down till you find the following:
sed 's/TST2/TST1/g' $SECDIR/secclass.$TIMESTAMP > $SECDIR/secclass.csv
Edit to reflect your productlines. The productline names must be in upper case
sed 's/FROM_PRODLINE/TO_PRODLINE/g' $SECDIR/secclass.$TIMESTAMP > $SECDIR/secclass.csv
- At the command line, run:
./secunld From_Productline To_Productline
For example:
./secunld prod test
- The script will create a tar file called secure.tar in the SECDIR you specified above.
- Edit secload and make the following changes to reflect your environment:
- Edit the line under the section that says
Need to set correct Environment variables within script for Lawson Environment variables are used within script, to make moving easier
Put in the path to your environment configuration file
. /lawson/lawson/lawson.env
- Edit the line under the section that says
Set the working directory to output the security data file extracts within validate that script variables are set within the script
Put in a valid directory path.
SECDIR=/Directory_Path
- Edit the line under the section that says
Now the Security dictionary needs to be rebuilt
Plug in your productline and environment names
bldsecdict -d PRODUCTLINE
- Before loading security information with secload, make an online backup of all affected GEN files. One way to accomplish this would be to run something like the following.
for secfile in `echo SECCLASS USER USEREXE USERKEY USERMENU USERPROD USERRECLVL USERSCR USERCAT USERFILE USERFLD LOCALE USERCNV USERTAB`
do
echo $secfile
cp $LADBDIR/GEN/${secfile}* /some/safe/directory/somewhere
done
- Load security information
./secload
- The script will process the secure.tar file and load security records into the security dictionary.
- Turn security back on:
lawsec on
- This completes the process of copying security.
Back
Home
|