使用 portal-ext.properties 禁用默认密码策略
Disable Default Password Policy with portal-ext.properties
所以我想禁用首次用户所需的密码更改。
我是 运行 这个本地人,要测试它直到它工作,正如我想要的那样。
我制作了一个 portal-ext
文件,其中包含以下内容:
company.security.auth.type=screenName
users.screen.name.allow.numeric=true
terms.of.use.required=false
users.reminder.queries.enabled=false
passwords.default.policy.changeable=true
passwords.default.policy.change.required=false
users.reminder.queries.custom.question.enabled=false
users.last.name.required=false
users.email.address.required=false
passwords.toolkit=com.liferay.portal.security.pwd.RegExpToolkit
passwords.regexptoolkit.charset=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghilmnopqrstuv
passwords.regexptoolkit.length=8
passwords.regexptoolkit.pattern=.+
如您所见,我已经将 passwords.default.policy.change.required
设置为 false
。
但是当我第一次登录时,它仍然显示 "change password" 屏幕,这是不应该的。
它需要从 portal-ext
文件而不是控制面板来完成,因为这个文件在多个服务器上运行,
所以它被禁用了。以及未来的服务器。
有人知道哪里出了问题,或者我需要什么吗?
提前致谢
当您添加 属性
passwords.default.policy.changeable=true
表示允许用户修改密码。另一方面,当您设置 属性、
passwords.default.policy.change.required=false
表示强制要求用户修改密码。在这里,您将其设置为 false。所以我们不应该得到 'Change password' screen.
我建议尝试从 portal-ext.property 文件中删除可更改的 属性。
passwords.default.policy.changeable=true
进一步查看 liferay 论坛,我发现了一个 post 关于这个,其中一个 liferay 工作人员post编辑了这个答案:
Unfortunately the default password policy is not something you can
configure in portal(-ext).properties so there's no way to disable it
that way.
因此不可能得到我想要的结果。
@Patrick R 这是我使用的 portal-ext。查看新用户登录的屏幕截图 in.Im 不确定这是否会解决您的问题或 not.Please 交叉检查属性。
#jdbc.default.jndi.name=jdbc/LiferayPool
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=root
soas.database.name=soasdb
soas.database.username=root
soas.database.password=root
soas.database.hostname=localhost
soas.database.connection=jdbc:mysql://localhost/soasdb?user=root&password=root
soas.servicepartner.name=localhost
json.service.auth.token.hosts.allowed=127.0.0.1
json.service.auth.token.enabled=false
jsonws.web.service.public.methods=*
jsonws.servlet.hosts.allowed=127.0.0.1
users.screen.name.validator=com.liferay.portal.security.auth.LiberalScreenNameValidator
ldap.base.provider.url= ldap://localhost:389
ldap.base.dn= dc=soas,dc=schoox
ldap.security.principal= cn=admin
ldap.security.credentials= blahblah
auth.pipeline.pre=com.liferay.portal.security.auth.LDAPAuth
ldap.auth.enabled=true
ldap.auth.required=false
ldap.password.policy.enabled=true
ldap.users.dn= dc=soas,dc=schoox
ldap.groups.dn= dc=soas,dc=schoox
ldap.import.enabled=true
ldap.import.interval=1
ldap.import.on.startup=true
ldap.import.method=group
ldap.import.group.search.filter.enabled=true
ldap.import.user.password.enabled=false
ldap.import.user.password.autogenerated=false
ldap.import.user.password.default=userPassword
ldap.user.mappings=screenName=uid\npassword=userPassword\nemailAddress=mail\nfirstName=givenName\nlastName=sn
#ldap.user.mappings=screenName=cn\npassword=userPassword\nemailAddress=mail\nfirstName=cn\nlastName=sn
#ldap.user.mappings=screenName=displayName\npassword=userPassword\nemailAddress=mail\nfirstName=givenName\nlastName=sn
ldap.group.mappings=groupName=cn\ndescription=description\nuser=member
ldap.import.user.search.filter=(objectClass=inetOrgPerson)
ldap.import.group.search.filter=(objectClass=groupOfEntries)
ldap.auth.search.filter=(uid=@screen_name@)
axis.servlet.hosts.allowed=
axis.servlet.https.required=false
company.security.auth.type=screenName
search.container.show.pagination.top=false
setup.wizard.enabled=false
新用户登录时
条款和条件
密码提示
登录成功
Blockquote
So i want to disable the required password change for fist time users. I am running this local, to test this out until it works, as i want it.
Blockquote
如果您想禁止更改用户密码,只需使用此门户属性:
passwords.default.policy.change.required=假
我同意 Olaf Kock。我目前正在从 6.2 升级到 Liferay DXP 7.2,我也面临着同样的问题,即首次用户通过 Kerberos SSO 登录时出现更改密码屏幕。
我在 UserLocalServiceImpl 中查看了 Liferay 代码库的 addUserWithWorkflow 方法,我还验证了数据库 table 用于处理密码策略,其中包含用于配置密码可更改和更改所需设置的这些列。首次添加用户时,如果密码策略中的列设置为 1(真),则 Liferay table 中的 passwordReset 列 - User_ 设置为 1(真)。这就是我们在用户登录后看到更改密码提示的原因。
我知道通过 portal-ext.properties 更改此配置的唯一方法是在服务器启动之前首次设置 Liferay 时,否则,必须在 Liferay 中应用数据库补丁 table - PasswordPolicy 为以下列设置 0(false)。
changeable and changeRequired
所以我想禁用首次用户所需的密码更改。 我是 运行 这个本地人,要测试它直到它工作,正如我想要的那样。
我制作了一个 portal-ext
文件,其中包含以下内容:
company.security.auth.type=screenName
users.screen.name.allow.numeric=true
terms.of.use.required=false
users.reminder.queries.enabled=false
passwords.default.policy.changeable=true
passwords.default.policy.change.required=false
users.reminder.queries.custom.question.enabled=false
users.last.name.required=false
users.email.address.required=false
passwords.toolkit=com.liferay.portal.security.pwd.RegExpToolkit
passwords.regexptoolkit.charset=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghilmnopqrstuv
passwords.regexptoolkit.length=8
passwords.regexptoolkit.pattern=.+
如您所见,我已经将 passwords.default.policy.change.required
设置为 false
。
但是当我第一次登录时,它仍然显示 "change password" 屏幕,这是不应该的。
它需要从 portal-ext
文件而不是控制面板来完成,因为这个文件在多个服务器上运行,
所以它被禁用了。以及未来的服务器。
有人知道哪里出了问题,或者我需要什么吗?
提前致谢
当您添加 属性
passwords.default.policy.changeable=true
表示允许用户修改密码。另一方面,当您设置 属性、
passwords.default.policy.change.required=false
表示强制要求用户修改密码。在这里,您将其设置为 false。所以我们不应该得到 'Change password' screen.
我建议尝试从 portal-ext.property 文件中删除可更改的 属性。
passwords.default.policy.changeable=true
进一步查看 liferay 论坛,我发现了一个 post 关于这个,其中一个 liferay 工作人员post编辑了这个答案:
Unfortunately the default password policy is not something you can configure in portal(-ext).properties so there's no way to disable it that way.
因此不可能得到我想要的结果。
@Patrick R 这是我使用的 portal-ext。查看新用户登录的屏幕截图 in.Im 不确定这是否会解决您的问题或 not.Please 交叉检查属性。
#jdbc.default.jndi.name=jdbc/LiferayPool
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=root
soas.database.name=soasdb
soas.database.username=root
soas.database.password=root
soas.database.hostname=localhost
soas.database.connection=jdbc:mysql://localhost/soasdb?user=root&password=root
soas.servicepartner.name=localhost
json.service.auth.token.hosts.allowed=127.0.0.1
json.service.auth.token.enabled=false
jsonws.web.service.public.methods=*
jsonws.servlet.hosts.allowed=127.0.0.1
users.screen.name.validator=com.liferay.portal.security.auth.LiberalScreenNameValidator
ldap.base.provider.url= ldap://localhost:389
ldap.base.dn= dc=soas,dc=schoox
ldap.security.principal= cn=admin
ldap.security.credentials= blahblah
auth.pipeline.pre=com.liferay.portal.security.auth.LDAPAuth
ldap.auth.enabled=true
ldap.auth.required=false
ldap.password.policy.enabled=true
ldap.users.dn= dc=soas,dc=schoox
ldap.groups.dn= dc=soas,dc=schoox
ldap.import.enabled=true
ldap.import.interval=1
ldap.import.on.startup=true
ldap.import.method=group
ldap.import.group.search.filter.enabled=true
ldap.import.user.password.enabled=false
ldap.import.user.password.autogenerated=false
ldap.import.user.password.default=userPassword
ldap.user.mappings=screenName=uid\npassword=userPassword\nemailAddress=mail\nfirstName=givenName\nlastName=sn
#ldap.user.mappings=screenName=cn\npassword=userPassword\nemailAddress=mail\nfirstName=cn\nlastName=sn
#ldap.user.mappings=screenName=displayName\npassword=userPassword\nemailAddress=mail\nfirstName=givenName\nlastName=sn
ldap.group.mappings=groupName=cn\ndescription=description\nuser=member
ldap.import.user.search.filter=(objectClass=inetOrgPerson)
ldap.import.group.search.filter=(objectClass=groupOfEntries)
ldap.auth.search.filter=(uid=@screen_name@)
axis.servlet.hosts.allowed=
axis.servlet.https.required=false
company.security.auth.type=screenName
search.container.show.pagination.top=false
setup.wizard.enabled=false
新用户登录时
条款和条件
密码提示
登录成功
Blockquote So i want to disable the required password change for fist time users. I am running this local, to test this out until it works, as i want it. Blockquote
如果您想禁止更改用户密码,只需使用此门户属性: passwords.default.policy.change.required=假
我同意 Olaf Kock。我目前正在从 6.2 升级到 Liferay DXP 7.2,我也面临着同样的问题,即首次用户通过 Kerberos SSO 登录时出现更改密码屏幕。
我在 UserLocalServiceImpl 中查看了 Liferay 代码库的 addUserWithWorkflow 方法,我还验证了数据库 table 用于处理密码策略,其中包含用于配置密码可更改和更改所需设置的这些列。首次添加用户时,如果密码策略中的列设置为 1(真),则 Liferay table 中的 passwordReset 列 - User_ 设置为 1(真)。这就是我们在用户登录后看到更改密码提示的原因。
我知道通过 portal-ext.properties 更改此配置的唯一方法是在服务器启动之前首次设置 Liferay 时,否则,必须在 Liferay 中应用数据库补丁 table - PasswordPolicy 为以下列设置 0(false)。
changeable and changeRequired