NOTE: This article is an INTERNAL article and is not visible to customers, currently. Please only link this article in internal comments, but not public comments.
Issue
- Multi-Factor Authentication (MFA) requires the user to follow up with a sent email to finish authentication.
- Email service was incorrectly set in Server Administration > Mail preventing the administrator to log in.
- How can the administrator log in to fix the Email service configuration?
Environment
- Liferay DXP 7.4, 7.3
Resolution
- If there are other administrators, they should try to log in and disable MFA until the email service is correctly configured.
- If that is not possible, the other option is to disable MFA with OSGi config files:
- Execute the SQL query:
select * from Configuration_ where configurationid like 'com.liferay.multi.factor.authentication.email.otp.configuration.MFAEmailOTPConfiguration%'
- Create a new file for each of the results with:
- File name: the value of the column
configurationid
from previous query adding the extension .config. - Content:the value of the column
dictionary
but changingenabled=B"true"
toenabled=B"false"
.
- File name: the value of the column
- Create another file with:
- File name: com.liferay.multi.factor.authentication.web.internal.system.configuration.MFASystemConfiguration.config
- Content:
disableGlobally=B"true"
service.pid="com.liferay.multi.factor.authentication.web.internal.system.configuration.MFASystemConfiguration"
- Stop the server.
- Place the created .config files in the directory
$LIFERAY_HOME/osgi/configs/
. - In portal-ext.properties set
setup.wizard.enabled=true
. - Start the server and follow the wizard to establish the admin data.
- Stop the server.
- Delete the file portal-wizard.properties that has been created and set
setup.wizard.enabled=false
in portal-ext.properties. - Start the server and set the new password.
- Stop the server again and delete the .config files added to
$LIFERAY_HOME/osgi/configs/
before. - Start the server again.
- Execute the SQL query:
- If MFA is needed again it will be necessary to uncheck the configuration Disable Multi-Factor Authentication in Control Panel > System Settings > Security > Multi-Factor Authentication, before setting the option in Control Panel > Instance Settings > Security > Multi-Factor Authentication.