New users are created with: profilepath: None sambahome: \\\<username> The reason is that ucr.get("ucsschool/import/set/serverprofile/path") and ucr.get('ucsschool/import/set/sambahome') return "" in the Kelvin container instead of None. Modify the code so that users are created with: profilepath: %LOGONSERVER%\%USERNAME%\windows-profiles\default sambahome: \\<OU-DC>\<username>
Fixed in branch dtroeder/52668_profilepath: 97b7b5e79 Bug #52668: handle empty string instead of None from ucr.get() At a later time we should investigate using the UCR code form the UCS 5.0 branch, instead of our own patches.
The profilepath is now set correctly, but the sambahome still has a problem. The UCRV "hostname" is not available, which results in the following: Via Kelvin: { "name": "test6", "school": "https://10.200.6.110/ucsschool/kelvin/v1/schools/DEMOSCHOOL", "firstname": "test", "lastname": "student", "birthday": "2021-02-16", "disabled": false, "record_uid": "test6", "roles": [ "https://10.200.6.110/ucsschool/kelvin/v1/roles/student" ], "school_classes": {"DEMOSCHOOL": ["Democlass"]}, "source_uid": "kelvin", "password": "12345678901234567890" } Result in udm: profilepath: %LOGONSERVER%\%USERNAME%\windows-profiles\default sambahome: \\None\test6 The None is the problem.
The "offensive" code snippet is this one: elif ucr.is_true('ucsschool/singlemaster', False): samba_home_path = r'\\%s' % ucr.get('hostname') The problem mentioned before thus only seem to occur on singleservers
Thanks, I hadn't tested this on a singleserver system. The problem was fixed by using the UCR variable "ldap/server/name" instead of "hostname". The code has been merged to the feature/kelvin branch (b444f5193) and the Docker image version 1.3.0 has been rebuilt.
Tested on singleserver with the new image -> works like a charm now!
A Kelvin API app with the changes in this bug has been published.