How To: Change User's Home Directory for Multiple Users

Howto: Change user’s home directory for multiple users

You want to change the user’s home directory for all or just a group of users. For example from \\servername\username to \\servername\home\username.

Step 1

This can not be done through the web interface (UMC) because even with multi-edit it would set the value to the same for all users. Instead, use udm on command line.

Step 2

Create a LDAP search filter to match your users. You might use the documentation for ldapsearch to create your needed filters.

Step 3

Once you have the list of the dn’s of the users you can use the udmcommand to change the desiredd variable:

udm users/user modify --dn "<DN of USER>"  --set sambahome='\\server\home'

Note: Be aware of the single quotes above. If using double quotes use “\\server\home”.

Step 4

Put all the above together in a shell script and you can modify the users as needed.