diegogslomp / samba-ad-dc

🐳 Docker image of Samba domain controller compiled from source
https://hub.docker.com/r/diegogslomp/samba-ad-dc
GNU General Public License v3.0
46 stars 18 forks source link

Samba modules issue #13

Closed killmasta93 closed 1 year ago

killmasta93 commented 1 year ago

Hi I currently trying to activate the shadow copies on the samba server but it seems that when i try to look for it it shows nothing

i had to first in the container install

apt install samba-vfs-modules

then checked


root@DC1:/usr/local/sbin# apt list | grep samba-vfs

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

samba-vfs-modules/jammy-updates,jammy-security,now 2:4.15.13+dfsg-0ubuntu1.1 amd64 [installed]

then the smb.conf,

[shares]
        path = /data
        comment = shares
    valid users = "@MYDOMAIN\domain users"
    force group = "Domain Users"
    writable = yes
    read only = no
    force create mode = 0660
    create mask = 0777
    directory mask = 0777
    force directory mode = 0770
    access based share enum = yes
    hide unreadable = yes
acl_xattr:ignore system acls = yes
    vfs objects = acl_xattr full_audit recycle shadow_copy2
shadow: snapdir = .zfs/snapshot
shadow: sort = desc
# Specify snapshot name: frequent, hourly, daily... as desired
shadow: format = _%Y-%m-%d_%H:%M:%S
shadow: snapprefix = ^pyznap
shadow: delimiter = _
shadow:localtime = yes

on the container it tries to shows but i keep getting this error

root@DC1:/data/.zfs# ls snapshot/pyznap_2023-04-30_16\:51\:52_frequent/
ls: cannot access 'snapshot/pyznap_2023-04-30_16:51:52_frequent/': Too many levels of symbolic links

it seems that its now appearing on the windows but when i try to restore i get

image

i think it might be an issue of the time from the host and the docker container

image

Thank you

diegogslomp commented 1 year ago

Hello

This image uses a compiled samba version, not the apt installed, so I don't know if your installed samba-vfs is used or is the right version.

The error that you posted shows symbolic link error, try to create a local samba share, from a container folder, and see if it works, than after try to map an share from outside.

This image is focused on samba active directory, but with some work can be a samba share.

killmasta93 commented 1 year ago

thank you for the reply, finally got it working i had to make it a volume and not a bind mount