You can change the Manager Database admin password by using
dbadmin.bat in the
<NSM installation DIR>\App\bin folder. To make this change, you must know the current admin password. If you have forgotten the current password, perform the following steps to reset the MySQL admin password.
NOTE: For upgrades, the default location is the previous database installation directory.
IMPORTANT: You must perform this procedure after the Manager service is stopped. Failure to do so can result in database corruption and subsequent database-related issues.
- Right-click the NSM notification area icon and select Stop Manager.
- Click Start, Run, type cmd, and press Enter.
- Change directory to the <database>\bin directory:
- For NSM 9.1.7.75 and earlier and 9.2:
Type cd <$install_directory>\McAfee\Network Security Manager\MySQL\bin\ and press Enter.
- For NSM 9.1.7.77 and later including 10.x:
Type cd <$install_directory>\McAfee\Network Security Manager\MariaDB\bin and press Enter.
- Log on to the MySQL root account. Type the following command and use the user name root and the root password:
NOTE: Substitute the user name and password in the command below, with root and root123.
mysql.exe -u<user name> -p<password> <databasename>
For example: $MYSQL\bin\mysql.exe -uroot -proot123
If you do not know the root account password, follow the steps in: KB66303 - How to reset the root password for the MySQL database component of Network Security Manager.
-
Type
show processlist; and press Enter.
- Confirm that the output of show processlist; does not show any processes running other than the show processlist command itself.
NOTE: If there are any NSM-related processes also present, the Java process tied in with the Manager is still running. The steps below are performed to completely stop all NSM-related processes before you change the admin password. The process will start again, after you restart the NSM service:
- Open Task Manager and select the Processes tab.
- Check the running processes for java.exe.
- Select java.exe and click End Process.
- Confirm the user name of the NSM database user:
- Open the <NSM installation DIR>\App\config folder.
- Open the <database name>_ext_assembly.xml file.
- For NSM 9.1.7.75 and earlier and 9.2:
Open mysql_ext_assembly.xml in a text editor of your choice.
- For NSM 9.1.7.77 and later including 10.x:
Open mariadb_ext_assembly.xml in a text editor of your choice.
NOTE: For upgrades, the default file name is mysql_ext_assembly.xml.
- Find the line of text with <property name="username" value="#USERNAME#"/>.
- The value of #USERNAME# is the name of the NSM database user. This database user name is typically 'admin' or 'intrushield', and is referenced as 'admin' in this example.
- Update the MySQL admin password from the MySQL prompt. Type the following command and press Enter:
Update mysql.user set Password=Password('admin456') where user='admin';
flush privileges;
- Check the user and password entries. Type the following commands and press Enter after each one:
use mysql;
select user,password from user;
The encrypted versions of the passwords are shown with their respective user names.
- Return to the <database name>_ext_assembly.xml file.
- Navigate to the section indicated below:
<extension-assembly>
<properties name="MySQLJDBCManager">
<property name="port" value="3306"/>
<property name="username" value="admin"/>
<property name="host" value="localhost"/>
<property name="dbname" value="lf"/>
<property name="encodedpasswd" value="1b4f164b4273681f"/>
</properties>
</extension-assembly>
- Change the entry encodedpasswd to passwd as shown below:
From: <property name="encodedpasswd" value="1b4f164b4273681f"/>
To: <property name="passwd" value="admin456"/>
Instead of the encoded value, type the password in clear text. For example, admin456.
- Save the file, making sure that you retain the file name.
- Right-click the NSM notification area icon and select Stop Manager.
- Run <NSM installation DIR>\App\bin\dbadmin.bat.
- Type the current password admin456 and new password admin123.
- When prompted for the root password, type your root password. For example, root123.
- Open the <database name>_ext_assembly.xml file you previously edited.
- There are two entries for the password, one encoded and the other plain text.
<extension-assembly>
<properties name="MySQLJDBCManager">
<property name="port" value="3306"/>
<property name="username" value="admin"/>
<property name="host" value="localhost"/>
<property name="passwd" value="admin123"/>
<property name="dbname" value="lf"/>
<property name="encodedpasswd" value="1b4f164b4273681f"/>
</properties>
</extension-assembly>
- Delete the line with the clear text password and save the changes:
<property name="passwd" value="admin123"/>
- Right-click the NSM notification area icon and click Start Manager.