Problem
After updating to UCS 5.2.5, home directory shares for users are no longer created on the intended file server (Managed Node, e.g. ucs3).
Prior to the update, home directories were created automatically for users. This behavior appears to have changed or is no longer functioning as expected.
Additionally, new user home directories are being created on the Primary Node instead of the designated file server.
Environment
- Univention Corporate Server (UCS) 5.2.5
- Samba-based domain environment
- Dedicated file server (Managed Node, e.g. ucs3)
- Primary Node (e.g. ucs1)
Root Cause
The UCR variable samba/homedirserver on the Primary Node was set to the Primary itself (ucs1) instead of the intended file server (ucs3).
As a result, home directories were created on the wrong system.
Investigation
By design, Samba home shares are automatically provided when the following UCR variable is enabled:
samba/share/home=yes
This variable ensures that a user’s home directory is exported as a Samba share.
Verification steps:
ucr get samba/share/home
If not set, it can be enabled via:
ucr set samba/share/home=yes
A restart of the Samba service is required afterward:
/etc/init.d/samba restart
During troubleshooting, it was observed:
-
On the Primary Node:
ucr get samba/share/home yes ucr get samba/homedirserver ucs1 -
The variable
samba/homedirserverincorrectly pointed to the Primary Node instead of the file server (ucs3). -
On the Managed Node, querying the variable initially resulted in a command syntax issue:
E: unknown action "get samba/share/home"(This indicates incorrect command usage rather than a configuration issue.)
Solution
Correct the UCR configuration so that the home directory server points to the intended file server.
- Set the correct home directory server on the Primary Node:
ucr set samba/homedirserver=ucs3
- Ensure the home share functionality is enabled:
ucr set samba/share/home=yes
- Restart Samba services on all relevant nodes:
/etc/init.d/samba restart
After applying these changes, newly created users will have their home directories created on the correct file server.
Additional Information
- Home directories are typically created upon first login, not necessarily at user creation time.
- If automatic creation at login is required, additional configuration is needed (e.g. PAM modules or login scripts).
Univention provides a reference implementation for automatic home directory creation here:
https://help.univention.com/t/cool-solution-automatically-create-users-home-directories/11518
After applying the corrected configuration and restarting Samba, testing confirmed that:
- New users receive their home directories on the correct file server
- Home directories are created successfully upon login