Trouble setting up samba

Kei

Kei

Soldato
Joined
24 Oct 2008
Posts
2,751
Location
South Wales
I've reinstalled my storage server OS having upgraded the hardware. I was using openSuSE leap 42.3 prior to the upgrade and have moved to Fedora 30. Before upgrading, I backed up the original smb.conf file and vsftpd.conf file in order to make life a little easier.

That said, it's not been quite as simple as I'd hoped. I have my raid array automatically mount to /media and the main folder on the array is named Storage. (/media/Storage) The error I keep getting is that the network path cannot be found.

This is the smb.conf file.
Code:
# smb.conf is the main Samba configuration file. You find a full commented
# version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
# samba-doc package is installed.
[global]
    workgroup = MSHOME
    passdb backend = tdbsam
    printing = cups
    printcap name = cups
    printcap cache time = 750
    cups options = raw
    map to guest = Bad User
    include = /etc/samba/dhcp.conf
    logon path = \\%L\profiles\.msprofile
    logon home = \\%L\%U\.9xprofile
    logon drive = P:
    usershare allow guests = No
    add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$
    domain logons = No
    domain master = No
    netbios name = KEI-NAS
    security = user
    wins support = No
    wins server =
[homes]
    comment = Home Directories
    valid users = %S, %D%w%S
    browseable = No
    read only = No
    inherit acls = Yes

[profiles]
    comment = Network Profiles Service
    path = %H
    read only = No
    store dos attributes = Yes
    create mask = 0600
    directory mask = 0700
    guest ok = Yes
[users]
    comment = All users
    path = /home
    read only = No
    inherit acls = Yes
    veto files = /aquota.user/groups/shares/
[groups]
    comment = All groups
    path = /home/groups
    read only = No
    inherit acls = Yes
[printers]
    comment = All Printers
    path = /var/tmp
    printable = Yes
    create mask = 0600
    browseable = No
[print$]
    comment = Printer Drivers
    path = /var/lib/samba/drivers
    write list = @ntadmin root
    force group = ntadmin
    create mask = 0664
    directory mask = 0775

[Storage]
    comment = NAS-Array
    guest ok = Yes
    inherit acls = Yes
    path = /media/Storage
    read only = No
    force user = kei

## Share disabled by YaST
# [netlogon]


I realise that there is quite a lot of unnecessary crap in that config but it was working in opensuse. As a test, I added this to the conf file and that new share works exactly as I'd expect. So I duplicated it and with a new name and set the path to /media/Storage and again it fails to find the network path.
Code:
[home]
        comment = Home Directory
        path = /home/kei
        # writable
        writable = yes
        # allow guest user
        guest ok = yes
        # guest only
        guest only = yes
        # fully accessed
        create mode = 0777
        # fully accessed
        directory mode = 0777
        inherit acls = Yes
        force user = kei


ls -dl /media/Storage gives the following response
Code:
drwxrwxrwx. 6 kei kei 4096 Apr 10 08:37 /media/Storage


fstab looks like so:
Code:
#
# /etc/fstab
# Created by anaconda on Sun May  5 14:19:03 2019
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
/dev/mapper/fedora_localhost--live-root /                       ext4    defaults        1 1
UUID=ae117901-8c30-41fe-8b5b-be8d8f017291 /boot                   ext4    defaults        1 2
UUID=23BC-E91B          /boot/efi               vfat    umask=0077,shortname=winnt 0 2
/dev/mapper/fedora_localhost--live-home /home                   ext4    defaults        1 2
/dev/mapper/fedora_localhost--live-swap none                    swap    defaults        0 0
/dev/disk/by-uuid/2af81cf5-ade0-4ab5-a8ec-480fdc074d97 /media auto nosuid,nodev,nofail,x-gvfs-show 0 0


I've pretty much run out of ideas, probably as I've been working on rebuilding this server for 2 days now. This single samba share is the only thing left that needs to be sorted for things to mirror how it was before the upgrade.
 
testparm output
Code:
Load smb config files from /etc/samba/smb.conf

Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions


I get network path not found when trying to access the share via a windows machine using exactly \\192.168.0.3\Storage. I also get the same error browsing via nautilus on the server itself.
 
SELinux? ... is it enabled and if so does the directory have the right contexts to be shared? (if it is enabled then put it in permissive mode and try again).
Putting SELinux into permissive mode seems to have solved the issue. I have the feeling that either opensuse 42.3 didn't have SELinux or I disabled it along with the firewall. This time around I've tried to configure it all correctly so that I don't have to disable it.
 
Back
Top Bottom