Bug 47937 - Always create link shortcuts in netlogon scripts even if they already exist
Always create link shortcuts in netlogon scripts even if they already exist
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Netlogon scripts
UCS@school 4.3
Other Linux
: P5 normal (vote)
: UCS@school 4.3 v5-errata
Assigned To: Ole Schwiegert
Jürn Brodersen
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-10-09 17:24 CEST by Valentin Heidelberger
Modified: 2018-11-16 11:48 CET (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.171
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
remove if condition in function that creates shortcuts to portal and umc on win desktops (1.43 KB, patch)
2018-10-09 17:24 CEST, Valentin Heidelberger
Details | Diff
remove if condition in function that creates shortcuts to portal and umc on win desktops (2.03 KB, patch)
2018-10-10 17:19 CEST, Valentin Heidelberger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Valentin Heidelberger univentionstaff 2018-10-09 17:24:54 CEST
Created attachment 9696 [details]
remove if condition in function that creates shortcuts to portal and umc on win desktops

The netlogon scripts currently check whether the links to UMC and portal already exist. Only if they don't, they actually create the links. This is problematic when e.g. the link in the shortcut is changed:

ucr set ucsschool/userlogon/portallink/link="https://google.com"

This change won't arrive on user's desktops if the shortcut already exists (with the old link).

I think we should just remove the condition and always create the shortcuts even if they already exist. In my tests this resulted in shortcuts that are always up to date with what is specified in the netlogon script.

Attached is a patch with the changes I made to /usr/share/ucs-school-netlogon-user-logonscripts/net-logon-script.vbs

in UCS@school Git:
ucs-school-netlogon-user-logonscripts/logon_script_templates/net-logon-script.vbs
Comment 1 Valentin Heidelberger univentionstaff 2018-10-09 17:28:37 CEST
Moved to "A user would likely not purchase the product" because the desktop shortcuts are the main link to the portal (e.g. all services supplied to users) for some customers and this is easy to fix, if my proposed solution is accepted.
Comment 2 Valentin Heidelberger univentionstaff 2018-10-10 17:16:59 CEST
There are concerns that creating the shortcut without the condition might mess up the layout of the other icons on the desktop.

This is not the case on Windows 7.
I logged in with a student, the portal link was created. Then I filled the entire desktop with numbered text files. I changed the link of the portal shortcut, resynced the logon script listener module and logged in again. The link had changed and all the icons were at their original position. The positions also didn't change with one or more free icon positions on the desktop. Luckily, there were also no (old) duplicates of the portal shortcut. So it seems that the vb script simply overwrites the existing shortcut, which is what we want.

This should be check with Win 10 and maybe 8/8.1 as well though.
Comment 3 Valentin Heidelberger univentionstaff 2018-10-10 17:19:29 CEST
Created attachment 9697 [details]
remove if condition in function that creates shortcuts to portal and umc on win desktops

unified diff as requested
Comment 4 Ole Schwiegert univentionstaff 2018-11-08 12:09:40 CET
Package: ucs-school-netlogon-user-logonscripts
Version: 14.0.1-4A~4.3.0.201811081208
Branch: ucs_4.3-0
Scope: ucs-school-4.3

Implemented provided patch
Comment 5 Jürn Brodersen univentionstaff 2018-11-09 00:10:33 CET
IconFile=...
IconIndex=...
are appended to the shortcut on every login (the shortcut can be opened in a text editor). This doesn't seem to be a problem at the moment, but I don't know if there are any size constrains on shortcuts.

If possible please only add/replace these lines if needed.

Also I can open microsoft edge only on the first login. WTF? But that is probably not related.
Comment 6 Ole Schwiegert univentionstaff 2018-11-09 09:51:51 CET
Package: ucs-school-netlogon-user-logonscripts
Version: 14.0.1-5A~4.3.0.201811090949
Branch: ucs_4.3-0
Scope: ucs-school-4.3
Comment 7 Jürn Brodersen univentionstaff 2018-11-12 17:35:54 CET
Fixed a small bug in CheckPattern()
[4.3 fca6aac28] Bug #47937: Fix CheckPattern
[4.3 a29323c28] Bug #47937: YAML

What I tested for win10 and win7:
Link is created on first login: OK
Link is recreated if deleted: OK
Link is updated with new portal link: OK

(Edge is also working again, no idea what the problem was...)
Comment 8 Sönke Schwardt-Krummrich univentionstaff 2018-11-16 11:48:18 CET
UCS@school 4.3 v6 has been released.

https://docs.software-univention.de/changelog-ucsschool-4.3v6-de.html

If this error occurs again, please clone this bug.