It would be nice if.......

  • I have made manual by hand edits of /etc/samba/smb.conf because the types of shares I wish to offer can not be created in the OMV Services | SMB/CIFS module.


    It would be nice if I could do the types of things I need via the OMV module, but what really gets my goat is that once I have made changes by hand, going back and using the module for other reasons does not preserve those manually made by hand changes. smb.conf is rewritten to reflect only what the module shows and allows. Basically, this eliminates all possible future use of the module by me.


    Can this be fixed?

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    • Offizieller Beitrag

    Add your changes to extra options boxes or create your own module in /usr/share/openmediavault/mkconf/samba.d/

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Add your changes to extra options boxes


    This does not fully work. Some of the things I add to the extra options box do appear in smb.conf, but others do not.


    What I am trying to add is a share for a chroot'd user who has a folder in /home. It works fine if I enter it by hand into smb.conf, but placing it into the extra options box and saving doesn't get it into the smb.conf file.


    This user's files also do not appear in the homes share if enabled.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    • Offizieller Beitrag

    What exactly are you putting in the extra options box that doesn't appear? I have never seen that.


    Did you enable the homes share under the Settings tab of Users in Access Rights Management along with user homes in Samba?


    The module option will definitely fix all issues though. What are using a chroot'd user for? Might be easier to just use docker.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I have three users with folders in /home which is on the system drive.


    /home/fred
    /home/sftp
    /home/extplorer


    The chroot'd user sftp is for chroot'd sftp service.


    Settings in Access Rights Management does not allow the system drive to be selected, only data drive volumes can be selected.


    Here is exactly what I am adding, the stuff for [root] is accepted, the stuff for [sftp] is not.


    [root]
    guest ok = yes
    writable = yes
    public = yes
    path = /
    force user = root


    [sftp]
    read list =
    write list =
    force directory mode = 0755
    store dos attributes = no
    guest ok = no
    create mask = 0755
    hide dot files = yes
    ea support = no
    inherit acls = yes
    writable = yes
    inherit permissions = no
    printable = no
    invalid users =
    path = /home/sftp
    force create mode = 0644
    comment = sftp on omv
    directory mask = 0755
    valid users =

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    • Offizieller Beitrag

    Just one note... I would never ever share root (/) over samba ESPECIALLY when forcing the user as root and setting guest ok!!!!!


    For the other part, just do the following


    nano /usr/share/openmediavault/mkconf/samba.d/21chrootsftp


    Then put the following code in:



    omv-mkconf samba should show the code you want now. Any change to samba from the web interface will write it too. It will also survive upgrades.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Well, that root share is for my convenience, and I am very careful with it.


    I'll try your suggestions for the oher part. Thanks

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!