Univention Bugzilla – Bug 43526
Make it possible to disable certain elements of the netlogon script structure
Last modified: 2017-03-21 12:35:55 CET
Got this request by customer. It would be nice to make it possible to disable certain elements of the netlogon script structure by UCR-Vars. E.g. the whole "Eigene Shares" folder, links in the folder (class links, work group links, home share link, marketplace link), drive mappings.
We have tested the given implementation of ucs-school-netlogon-user-logonscripts. On our PC systems the desktop folder with the links the classroom share and the workgroup share works fine. On our thin clients wo got a error message on accesing the folder because of the restricted terminal server enviroment. For security reasons we restrict the user access to the local c: drive by group policies. To use the links to the shares in our enviroment it will be neccesary that the folder to save the sharelinks in is free configurable. For example "%userprofile%\desktop\" or any other path.
r77137: allow to set the parent path of the directory with the links: ucr set ucsschool/userlogon/shares_folder_parent_path='%USERPROFILE%\Desktop'
r77161: * support switching off parts of logon script, introducing UCRVs (all create_* by default set to True, disabled_share_links by default empty): - ucsschool/userlogon/create_drive_mappings: - ucsschool/userlogon/create_myfiles_link - ucsschool/userlogon/create_shortcuts - ucsschool/userlogon/create_teacher_umc_link - ucsschool/userlogon/disabled_share_links/* ucsschool/userlogon/disabled_share_links/*: Comma separated list of shares per server for which not to create links. The shares names can contain regular expressions. Example: To prevent the creation of links to shares for the 1st class of the school "GS_Nord" on the server "mydc" and the link to "Marktplatz": ucsschool/userlogon/disabled_share_links/mydc='GS_Nord-1.*,Marktplatz'. The value "all" prevents the creation of all share links. * refactor more code from generate_windows_link_script into separate methods * move all VBS code into one template, format and call appropriately * s/listener.baseConfig/listener.configRegistry/g Package: ucs-school-netlogon-user-logonscripts Version: 12.0.4-10.65.201702281511 Branch: ucs_4.1-0 Scope: ucs-school-4.1r2
(In reply to Daniel Tröder from comment #3) > r77161: > * support switching off parts of logon script, introducing UCRVs (all > create_* by default set to True, disabled_share_links by default empty): > - ucsschool/userlogon/create_drive_mappings: > - ucsschool/userlogon/create_myfiles_link > - ucsschool/userlogon/create_shortcuts > - ucsschool/userlogon/create_teacher_umc_link OK > - ucsschool/userlogon/disabled_share_links/* > > ucsschool/userlogon/disabled_share_links/*: Comma separated list of shares > per server for which not to create links. The shares names can contain > regular expressions. Example: To prevent the creation of links to shares for > the 1st class of the school "GS_Nord" on the server "mydc" and the link to > "Marktplatz": > ucsschool/userlogon/disabled_share_links/mydc='GS_Nord-1.*,Marktplatz'. The > value "all" prevents the creation of all share links. Substrings have to end with "$" (or better they should be always enclosed by "^" and "$") to prevent matching problems. If only a substring is entered, it may also match to longer share names: e.g. if "Markt" is specified via UCR it would also match to "Marktplatz". Tested with follwing value to filter out share "Markt" (but not "Marktplatz") and all class shares of second class: "gsmitte-2A" and "gsmitte-2B" but not e.g. "gsmitte-4C": ucr set ucsschool/userlogon/disabled_share_links/master63='^.*-2.$,^Markt$' → fixed UCR variable description in SVN > * refactor more code from generate_windows_link_script into separate methods Chapeau! Big code change but the py/vbs code is now much more readable. > * move all VBS code into one template, format and call appropriately > * s/listener.baseConfig/listener.configRegistry/g initialize() checks for templates shortcut-to-share.vbs and teacher-umc-link.vbs ,that have been removed via r77161, and emits an error message in listener.log. → fixed via r77368 I noticed that the .ico file for the teacher's UMC link is always missing. Reason is, that _mkdir() copies the ico file to the netlogon directory and afterwards clean() removes all files in that directory. Code has been altered that only files with suffix .vbs (case-insensitive) are removed. → fixed via r77359 ucs-school-netlogon-user-logonscripts (12.0.5-2): r77359 | Bug #43526: only remove VBS files otherwise the icon for teacher's UMC link is always removed r77358 | Bug #43526: removed check for non-existing VBS templates r77357 | Bug #43526: fixed UCR variable description Package: ucs-school-netlogon-user-logonscripts Version: 12.0.5-2.66.201703060048 Branch: ucs_4.1-0 Scope: ucs-school-4.1r2 OK: YAML FIXED: code change FIXED: functional test
UCS@school 4.1 R2 v10 has been released. http://docs.software-univention.de/changelog-ucsschool-4.1R2v10-de.html If this error occurs again, please clone this bug.