UCR Variablen:
If the shares for a school are created on a different host and access is intended to take place from that host, the following UCR variable must be set on the school server so that additional hosts are taken into account for the shares.
ucsschool/userlogon/shares/validservers
ucr info ucsschool/userlogon/shares/validservers
ucsschool/userlogon/shares/validservers: <empty>
Defines the valid servers for network shares (default: not defined, possible values: empty [only shares from the local host], comma-separated list of hostnames
[shares from these servers], * [all shares]
Categories: ucsschool-netlogon
Default: (not set)
Type: str
ucr set ucsschool/userlogon/shares/validservers='heisenberg,ucs5backup'
Example output:
root@heisenberg:~# ucr get ucsschool/userlogon/shares/validservers
heisenberg,ucs5backup
Example output from the vbs file:
root@heisenberg:~# tail /var/lib/samba/netlogon/user/s.test.vbs
CreateLinkToMyFiles
CreateShareShortcut "heisenberg","Marktplatz"
CreateShareShortcut "heisenberg","Heisenberg-1A"
CreateShareShortcut "heisenberg","test-share-1"
CreateShareShortcut "heisenberg","test-share-2"
CreateShareShortcut "ucs5backup","test-share-3"
CreateShareShortcut "ucs5backup","test-share-4"
CreateUcsPortalLink
MapDrive "M:","\\heisenberg\Marktplatz"
MapDrive "K:","\\heisenberg\Heisenberg-1A"
Debugging:
ucr set ucsschool/userlogon/daemon/debug/level=4
systemctl restart ucs-school-netlogon-user-logonscripts.service
univention-directory-listener-ctrl resync ucs-school-user-logonscript
The resync only writes an entry to a DB. The actual work is done by the daemon
Logfiles
/var/log/univention/listener.log
/var/log/univention/ucs-school-user-logonscript-daemon.log
Why could it be that the netlogon script does not contains a MapDrive "K:", "\\SERVER\CLASS" line.
I think the daemon will compare the hostname dc-xyz with the rs123456 of the attribute univentionShareHost and just decline silently, since the valid server list is empty.
You would have to put rs123456 into ucsschool/userlogon/shares/validservers, since that is the hostname from univentionShareHost. Then the letter K is created, but it is also possible, that it shows now the wrong path:
MapDrive "M:","\\dc-xyz\Marktplatz"
MapDrive "K:","\\rs123456\rs123456-09c"
Then you have to check the class share and the OU configuration:
univention-ldapsearch -LLLb cn=rs123456-09c,cn=klassen,cn=shares,ou=rs123456,dc=schein,dc=me univentionShareHost
dn: cn=rs123456-09c,cn=klassen,cn=shares,ou=rs123456,dc=schein,dc=me
univentionShareHost: rs123456.schein.me
--------------------------
univention-ldapsearch -LLL -b ou=rs123456,dc=schein,dc=schule -s base ucsschoolHomeShareFileServer ucsschoolClassShareFileServer
dn: ou=rs123456,dc=schein,dc=me
ucsschoolHomeShareFileServer: cn=dc-xyz,cn=dc,cn=server,cn=computers,ou=campus_xyz,dc=schein,dc=me
ucsschoolClassShareFileServer: cn=dc-xyz,cn=dc,cn=server,cn=computers,ou=campus_xyz,dc=schein,dc=me
So you have also to adjust the univentionShareHost attribute on these shares, to make the path build correct