NS6.8 DC How to disable [homes] shares?

,

In my company w7 users logged to domain only need access to departament/group shares. But NS6.8 mount also a home directory per user.
Trying to solve this i naively edit the smb.conf (commenting out the [homes] section) but a few minutes later it was overwritten.
This way i discover the NS template system. After some read of the dev manual i couldn’t figure how to make this change permanent.
Same problem was presented in this nethserver forum post but is long due orphaned.
There is a way to do that?

1 Like

Finally got this. Permanent template for samba shares is located in
/etc/e-smith/templates-custom/etc/samba/smb.conf/70shares

Edited that file to looks like: (commenting out relevant lines)

; Deshabilitado en /etc/e-smith/templates/etc/samba/smb.conf/70shares
;[homes]
;comment = Home directories
;browseable = no
;writable = yes
;create mode = 0660
;force create mode = 0660
;directory mode = 0770
;force directory mode = 0770
;path = {$baseDir}/home/%S

Then run:

signal-event nethserver-samba-update

to update samba configuration

2 Likes

Your solution is good but partial. It works until nethserver-samba is updated.

To make the customization permanent, copy

 /etc/e-smith/templates/etc/samba/smb.conf/70shares

to

 /etc/e-smith/templates-custom/etc/samba/smb.conf/70shares

Then edit it as you like.

This is documented here

http://docs.nethserver.org/projects/nethserver-devel/en/latest/templates.html#local-site-overrides-templates-custom-and-templates-user-custom

4 Likes

THX Davide!

Please, fix your comment above and mark it as solution for future reference!