Author Topic: [SOLVED] enable symlinks in samba  (Read 3529 times)

rhernandez50

  • Zen Apprentice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
[SOLVED] enable symlinks in samba
« on: March 27, 2012, 06:05:54 pm »
It took me a while to put the pieces together to do this (I had to find the Zentyal hooks folder, samba restart commands, proper sed usage, etc.). Nothing genius-level, but a bunch of small pieces none-the-less.

I wanted to enable symlinks in samba the "Zentyal-way" so that I could share folders on different mounts under one samba share. To do so, one only needs create a samba hook script as follows:

1. Create the file /etc/zentyal/hooks/samba.postsetconf with the following contents:
Code: [Select]
#!/bin/sh

sudo sed -i 's/printing = cups/\printing = cups \
 follow symlinks = yes \
 wide links = yes \
 unix extensions = no/g' /etc/samba/smb.conf

exit 0
* The idea here is that you're inserting three lines after the last line in the [global] section of your /etc/samba/smb.conf file. You may have a different line or choose to insert these three lines elsewhere.

2. Restart samba services:
Code: [Select]
>/etc/init.d/zentyal samba restart
3. Done

Note: symlinks were disabled in Samba for security reasons so this is undoing that "fix". However, IMHO if you're running everything else locked down and/or aren't protecting super sensitive information, this shouldn't be a concern.