Bug 48541 - Hide "windows-profiles" in home share
Hide "windows-profiles" in home share
Product: UCS
Classification: Unclassified
Component: Samba
UCS 4.3
Other Windows NT
: P5 normal (vote)
: UCS 4.4-0-errata
Assigned To: Julia Bremer
Arvid Requate
Depends on:
  Show dependency treegraph
Reported: 2019-01-29 11:01 CET by Michael Grandjean
Modified: 2019-05-15 14:52 CEST (History)
4 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 5: Will affect all installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.229
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Ticket number:
Bug group (optional): Usability
Max CVSS v3 score:
heidelberger: Patch_Available+

Patch for samba base.conf template to hide windows-profiles in homes by default (467 bytes, patch)
2019-02-13 21:26 CET, Valentin Heidelberger
Details | Diff
Patch for samba base.conf template to hide windows-profiles in homes by default (462 bytes, patch)
2019-02-13 21:29 CET, Valentin Heidelberger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Grandjean univentionstaff 2019-01-29 11:01:07 CET
Imho we should hide the folder "windows-profiles" in the home share to prevent any unintentional fiddling with the profile files and to reduce confusion ("why are there a dozen strangely named folders in my home share?")

I guess the "hide files" feature (see man smb.conf) should do the job.
Comment 1 Valentin Heidelberger univentionstaff 2019-02-13 21:26:20 CET
Created attachment 9838 [details]
Patch for samba base.conf template to hide windows-profiles in homes by default

"hide files" is sufficient for this imo. I tried setting it manually via smb.conf as a global option. After a /etc/init.d/samba restart all folders/files matching windows-profiles were hidden. I tried setting the parameter via UCR 

ucr set samba/global/options/"hide files"="/windows-profiles/"

but unfortunately this not only adds the global hide files parameter set correctly to /windows-profiles/ but also an empty hide files parameter to all other sections (including homes) which seems to overwrite the global parameter.

However I like Michaels idea to just hide windows-profiles by default. I can't think of any scenario where it's visibility is required right now. Also if someone *really* wanted to mess with it, they could still open the path manually. 

This patch adds a hide files parameter to the default homes definition in /etc/univention/templates/files/etc/samba/base.conf
After a /etc/init.d/samba restart it hid windows-profiles from the users on Win 7, Win 10 and Nextcloud in my test env.
Comment 2 Valentin Heidelberger univentionstaff 2019-02-13 21:29:13 CET
Created attachment 9839 [details]
Patch for samba base.conf template to hide windows-profiles in homes by default

Wrong indentation
Comment 3 Michael Grandjean univentionstaff 2019-04-15 14:21:02 CEST
So today a teacher deleted their whole profile folder, because they thought it was an unnecessary and unwanted folder. As a consequence, the whole roaming profiles process was stuck, which caused some extensive troubleshooting in the customers first level support.

We really should hide this folder.
Comment 4 Julia Bremer univentionstaff 2019-04-16 12:27:23 CEST
Successful build
Package: univention-samba4
Version: 8.0.0-18A~
Branch: ucs_4.4-0
Scope: errata4.4-0

Successful build
Package: univention-samba
Version: 13.0.0-3A~
Branch: ucs_4.4-0
Scope: errata4.4-0

46a7913528 Bug #48541: Hide windows-profiles as default

I added the "hide files" feature to the samba base.conf template file. 
Adding an ucr variable to hide this folder is not necessary in my opinion, since one can always make the folder visible again by using the "show hidden files" option in windows "folder options".
Comment 5 Arvid Requate univentionstaff 2019-04-18 15:30:41 CEST
* Update: Ok
* Function test: Ok
* Advisory: Ok