Samba fileshare error

The error is when making a new share. When I use net usershare add it just gives the permission error. It happen only when I’m trying to share a folder on my mount tho

I’m looking at my config and see I setup like this:

[Backups]
    comment = backups
    path = /shared/Backups
    read list = barry
    write list = barry
    read only = No

In my global section I have this (I also have stuff for Apple Timeshare that I ommitted)

[global]
    workgroup = ADELPHA
    server string = Fender
    log file = /var/log/samba/%m.log
    max log size = 100
    idmap config * : backend = tdb
    valid users = barry
    cups options = raw

    min protocol = SMB2

I don’t know if changing any of your options to match mine will help.

Don’t know why but if I add the share by directly editing the smb.conf it works even tho it won’t show up in net usershare list.

Update: Just realized the error only happens when I’m trying to specifically share /mnt/NAS. Sharing any folder inside the drive works just fine

A share added to the smb.conf file is not a usershare.

If that is your smb.conf file, then you have usershares turned off, this is because the default for ‘usershare max shares’ is ‘0’, which means ‘do not allow usershares’.

Damn. It worked just fine before an update tho. Does it work if I have usershare max shares = 100 on my usershare.conf?

Just put that line in the ‘global’ portion of your smb.conf file.

Do you see your smb.conf shares when running net share rather than net usershare?

Not sure why you’d want to share /mnt/NAS again. Your smb.conf already specifies that share:

[NAS]
        path = /mnt/NAS
        browseable = yes
        writable = yes
        guest ok = yes
        read only = No
        valid users = sanc

The above should allow user sanc to access the above share without issue. Isn’t that what you’re trying (and succeeding) to do, or am I missing something important?

Yes you’re right every share that is in my smb.conf works perfectly fine but I just like creating the shares through Dolphin or GUI better so I just hope that my issue of having to creating shares of a mount directly through the smb.conf files can be fixed. I just don’t like having errors in my system too so I’d like to solve errors before more appears.

Update: after deleting the share from smb.conf and deleting it using sudo net usershare delete nas. Adding it again using net usershare add nas /mnt/NAS works.