I'm using Alfresco 7.4.1.
I need to allow access to Alfresco with LDAP credentials only. I would like to change all the passwords of the local users, to no longer allow users access. Alfresco has around 1000 local users. Is there a way, via API, to be able to update all passwords?
I tried this API:
http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/people/f2df59d2-7187-400f-bcbb-aaaaca5b52c9/reset-password
with the following body, but it doesn't work.
{
"password":"newPassword",
"id":"user.name",
"key":"f2df59d2-7187-400f-bcbb-aaaaca5b52c9"
}
The API you are using does not change the user's password as you think, it tries to find a worklow initiated by
/people/{personId}/request-password-resetto allow the end user to send a new password when receiving a reset password email from the workflow. So it's not what you're looking for at all...When you configure LDAP authentication in Alfresco, you add an additional authentication to the
authentication.chain. e.g.This means that when a user logs in (in this example), the specified password is first validated against ldap-ad1 and, if this fails, against alfrescoNtlm1. Your problem is that you are always authenticating against more than one authentication system.
To achieve what you are looking for, you could remove the usr nodes from the
user://alfrescoUserStoreunder/sys:system/sys:people/. These nodes more or less only store the password for a local user. However, you should keep the password for the admin user in order to always have a local user to log in. The user node itself is stored in/sys:system/sys:people, so you don't have to worry about deleting theusr:usertype nodes that contain the password.