Trelp,No problem! Here's how this works. I am basing this off 3.4.d Community. And I am going to assume you already have your Alfresco server configured to authenticate against an LDAP directory.If you go look in $TOMCAT_HOME/shared/classes/alfresco/extension/subsystems/Authentication/ldap/ldap1 you should see a file called ldap-authentication.properties.If you open that up and search for defaultHomeFolderProvider you should find something that looks like this:ldap.synchronization.defaultHomeFolderProvider=userHomesHomeFolderProvider
That tells Alfresco to create a folder in User Homes for each user using their username as the folder name.There are other folder providers that ship out-of-the-box. One is the companyHomeFolderProvider. To change to a different home folder provider, you can comment out the existing line and add a new line that specifies the new home folder provider, like this:ldap.synchronization.defaultHomeFolderProvider=companyHomeFolderProvider
Now when you restart Tomcat and LDAP syncs, users will not get a unique folder. Instead, they'll all point to the same thing: theCompany Home folder. Because the special EVERYONE group is set to Consumer on Company Home, you won't have the problem you are worried about regarding having a large number of people each with their own user home folders.It is important to note that cm
erson objects (and home folders) do not get set until the user logs in. When users are sync'd from LDAP they get authority entries, which allows them to log in but they do not get person objects. They must log in for that to happen. And that's when their home folder gets created if you have the userHomesHomeFolderProvider set.That means that making this will not retroactively change any of the users that have already and had their user home folder created for them. If you want to change their home folder, you'll need to run a script (server-side JavaScript is ideal for this) to set the cm:homeFolder property on their cm
erson object. When using the companyHomeFolderProvider the cm:homeFolder property needs to be set to the node reference of the Company Home folder.Before making any changes to existing cm
erson objects you might want to use the Node Browser in Alfresco Explorer (find it in the admin console) to actually see the values for both the cm:homeFolderProvider and the cm:homeFolder properties. You can find them by doing a lucene search, like this:TYPE:"cm:person"
Or you can navigate to them. The cm
erson objects live in this path in the workspace://SpacesStore:/{http://www.alfresco.org/model/system/1.0}system/{http://www.alfresco.org/model/system/1.0}people/
If the out-of-the-box user home folder providers don't meet your needs you can write Java code to create your own user home folder provider. For example, maybe you want to put all employees in the same department in the same home folder. Step-by-step instructions for doing that are too long to include here, but if you go look in $TOMCAT_HOME/webapps/alfresco/WEB-INF/classes/alfresco/authentication-services-context.xml you will see a bean, like this:
<bean name="companyHomeFolderProvider" class="org.alfresco.repo.security.person.ExistingPathBasedHomeFolderProvider" parent="baseHomeFolderProvider">
<property name="path">
<value>/${spaces.company_home.childname}</value>
</property>
<property name="storeUrl">
<value>${spaces.store}</value>
</property>
</bean>
You could go look at the source of that ExistingPathBasedHomeFolderProvider class as an example for creating your own custom class, then tell Alfresco about it by configuring your own Spring bean in your own context.xml file that points to your custom provider class.There you go. Hopefully that explains it in enough detail for you to decide if it meets your needs, and if not, gives you some avenues to explore to customize it so it will work for you.Jeff