1. intro

synology nas005.d01.net 10.1.1.5
server   srv007.d01.net 10.1.1.7
Tip music.d01.net as an DNS alias pointing to srv007.d01.net

2. on the synology

enable NFS in the File Services
echo "/volume1/music/ *(ro,async,no_root_squash,insecure)" > /etc/exports
exportfs -r

3. nfs client on the server

yum -y install autofs nfs-utils
systemctl enable --now nfs-client.target rpcbind.service
showmount -e nas005.d01.net
Export list for nas005:
/volume1/music *
mkdir -p /data1/music /data1/etc/autofs
echo "/- /data1/etc/autofs/user.autofs" > /data1/etc/autofs/master.autofs
ln -sfv /data1/etc/autofs/master.autofs /etc/auto.master.d/
echo "/data1/music/ -fstype=nfs,ro nas005.d01.net:/volume1/music/" > /data1/etc/autofs/user.autofs
systemctl enable --now autofs.service
ll /data1/music/
total 116
drwxrwxrwx 16 1027 users 4096 Apr 19 22:52 '#'
drwxrwxrwx 48 1027 users 4096 Nov 15  2021  0
drwxrwxrwx 23 1027 users 4096 Sep 20  2025  a
drwxrwxrwx 38 1027 users 4096 Feb  2 23:14  b
drwxrwxrwx 23 1027 users 4096 Mar  7 21:19  c
///

4. samba server on the server

yum -y install samba samba-client
vi /etc/samba/smb.conf
# Global parameters
[global]
  workgroup = d01
  server string = %h (samba server %v)
  bind interfaces only = yes
  interfaces = lo eth0
  log level = 0
  log file = /var/log/samba/log.%m
  max log size = 50
  printing = bsd
# smb ver 1.0
  client min protocol = NT1
  server min protocol = NT1
  ntlm auth = yes
  unix extensions = no

[music]
  comment = music share
  path = /data1/music/
  read only = yes
  browseable = yes
  force user = root
  force group = root
  write list = @sonos
  create mask = 0660
  directory mask = 0770
  force create mode = 0660
  force directory mode = 0770
systemctl enable --now smb.service

5. upm

groupadd sonos
useradd -g sonos -d /homes/sonos/ sonos
smbpasswd -a sonos # xx

6. testing

smbclient -L music.d01.net -Usonos%xx
        Sharename       Type      Comment
        ---------       ----      -------
        music           Disk      music share
        IPC$            IPC       IPC Service (srv007 (samba server 4.17.5))
Reconnecting with SMB1 for workgroup listing.

        Server               Comment
        ---------            -------

        Workgroup            Master
        ---------            -------
smbclient //music/music/ -Usonos%xx -c ls
  .                                   D        0  Sun Apr 16 01:08:36 2023
  ..                                  D        0  Sat Apr 22 18:50:50 2023
  d                                   D        0  Thu Nov 11 00:24:28 2021
  k                                   D        0  Thu Nov 11 00:24:02 2021
  s                                   D        0  Sat Nov 19 01:48:09 2022
///