How to move web user accounts to a new eHealth server

Document ID : KB000023370
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:

How to move web user accounts to a new eHealth server

 

Answer:

The easiest way to move web user accounts to a new eHealth server is to export the account configuration and report information from the old eHealth server using DCI, then import the web user and MyHealth configuration information into the new eHealth server.

The following steps need to be run as $NH_USER.

1. Export the web user account configuration from the old eHealth server:

Command Syntax:
nhExportWebAcct -dciOut :outputFile:.dci -reportsFile :reportFile:.zip -passwd -copyToHost :newHostname:

Examples:

Web User Configuration Only:
nhExportWebAcct -dciOut C:\119826\webUserCfg.dci

Web User Configuration with MyHealth and historical reports:
nhExportWebAcct -dciOut C:\119826\webUserCfgWithReports.dci -reportsFile C:\119826\webUserReports.zip

Web User Configuration with Password encryption (assuming move to same OS type)
nhExportWebAcct -dciOut C:\119826\webUserCfg.dci -passwd

Export web user configuration and reports and automatically import to new host:
nhExportWebAcct -dciOut C:\119826\webUserCfgWithReports.dci -reportsFile C:\119826\webUserReports.zip -copyToHost razzmataz


2. Move the .dci and .zip files over to the new system

3. Import the web user account configuration into the new eHealth server:

Command Syntax:
nhImportWebAcct -dciIn :inputFile:.dci -reportsFile :reportFile:.zip

Examples:

Web User Configuration Only:
nhImportWebAcct -dciIn /export/maryland1/eh565/119826/webUserCfgWithReports.dci

Web User Configuration with MyHealth and historical reports:
nhImportWebAcct -dciIn /export/maryland1/eh565/119826/webUserCfgWithReports.dci -reportsFile /export/maryland1/eh565/119826/webUserReports.zip

Web User Configuration with Password encryption (assuming move to same OS type)
nhImportWebAcct -dciIn C:\119826\webUserCfg.dci

4. If needed, correct the passwords for web users

 

This is an alternative way to do this without running the above commands:

 

If you need to move your previously run Web Reports and Web Users to the new eHealth system:

 

 

     1. To move existing web reports, copy the contents of the following directories and all of their subdirectories from the existing eHealth system to the new eHealth system:
Be sure to maintain permissions. These directories must be read + write for the $NH_USER and the $NH_USER's primary group.
$NH_HOME/web/output/users
$NH_HOME/web/output/groups
$NH_HOME/web/output/grouplists
Delete the reportIndex.txt file from the root of each of these directories. They will be recreated the first time you log onto the web and access the report list tab.

 

     2. To move your existing web users and their configuration settings to the new eHealth system:

 

Both eHealth servers involved must have the same Operating System and eHealth version. This is due to the different encryption methods used by Apache on different Operating Systems when creating the password strings in the passwd file

 


     1. As the root user:  Stop the eHealth web server  -  How to stop and start the eHealth web server
     2. As the $NH_USER:  Source the $NH_HOME/nethealthrc.sh (.csh if C-shell, .ksh if Korn shell)
     3. Backup the following files
          a) $NH_HOME/web/webCfg/users.cfg
          b) $NH_HOME/web/webCfg/passwd
          c) $NH_HOME/web/httpd/httpd.conf
     4. Obtain the $NH_HOME/web/webCfg/users.cfg from either:
          a) The old eHealth system, - OR -
          b) Inside a saved database archive (*..tdb/web/webCfg/passwd.<platform>) location,
     5. Place the users.cfg and passwd files obtained in the previous step in the $NH_HOME/web/webCfg directory of the new eHealth installation. If the file was obtained from a database save, remove the .<platform> extension from the file.

 

Example: Copy *.tdb/web/webCfg/passwd.nt from the database save location to $NH_HOME/web/webCfg/passwd on the new system.

 

     6. CD to the $NH_HOME/web/webCfg directory
     7. Run command: ./nhiHttpdCfg -user <$NH_USER> -grp <$NH_USER group> -nhDir <$NH_HOME> -cfg <$NH_HOME>/web/webCfg/users.cfg > <$NH_HOME>/web/httpd/httpd.conf
         Where:
            a) <$NH_USER> = The eHealth user name
            b) <$NH_USER group> = The group name the eHealth user belongs to
            c) <$NH_HOME> is replaced with the absolute path for the directory where eHealth is installed

 

EXAMPLE:

 

     ./nhiHttpdCfg -user ehealth -grp staff -nhDir /export/ehealth -cfg /export/ehealth/web/webCfg/users.cfg > /export/ehealth/web/httpd/httpd.conf

 

     8. Start the eHealth web server