Score:0

Need help setuping a samba password protected share

gg flag

I'm trying to make on a Ubuntu (22.04.1 LTS) server computer a Samba (4.15.9-Ubuntu) file server with a password protected share :

I've keep the [homes] config so that I know it works with the existing user on Ubuntu, which is "toi". I now want to have a share of a mounted external disk drive with the login "bert" and a custom password.

I've mounted the drive in /mnt/m3. The file I want to access is in /mnt/m3/STOREX/, which is root:root accessible, and with mod 777.

I've created next the user "bert" of the group "samba" and added him as a samba user with a custom password.

Next, I've changed the smb.conf file like so :

[global]
        bind interfaces only = Yes
        interfaces = 127.0.0.0/8 eno1
        log file = /var/log/samba/log.%m
        logging = file
        map to guest = Bad User
        max log size = 1000
        obey pam restrictions = Yes
        pam password change = Yes
        panic action = /usr/share/samba/panic-action %d
        passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
        passwd program = /usr/bin/passwd %u
        server role = standalone server
        server string = %h server (Samba, Ubuntu)
        unix password sync = Yes
        usershare allow guests = Yes
        idmap config * : backend = tdb
        hosts allow = 192.168.


[homes]
        browseable = No
        comment = Home Directories
        create mask = 0775
        directory mask = 0775
        read only = No


[DD]
        comment = DD
        browseable = yes
        create mask = 0775
        directory mask = 0775
        path = /mtn/m3/STOREX
        read only = No
        valid users = @samba bert toi

Now, whatever I put as parameter of the valid users line, nothings work. I can see the share on the network, but logging doesn't work, either with my working user "toi" or the new one "bert", and I don't understand what I'm doing wrong

poloine avatar
gg flag
I appears the original solution isn't there anymore, so I figured I should put it to close this question. I made a typo, the path of share [DD] should be /mnt/m3/STOREX
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.