SMB/CIFS - cannot connect to shared folders

  • Been running into lots of config errors after a clean reinstall of OMV3. I've had guest only SMB/CIFS sharing for years without an issue. After the install, I cannot connect to any shares. Below is smb.conf file and some output for the samba service. Again, this is on a clean install of OMV3 without only the docker plugin enabled. I've tried connecting to the samba shares from win10 and RPi3. Neither one can even find OMV using the web address. On the RPi3, for instance, I just get "Unable to find suitable address."



    I have no clean what is going on with this. I've been working at it for several hours and need to stop. Any help is much appreciated.



    root@openmediavault:/srv# sudo cat /etc/samba/smb.conf
    #======================= Global Settings =======================
    [global]
    workgroup = WORKGROUP
    server string = %h server
    dns proxy = no
    log level = 0
    syslog = 0
    log file = /var/log/samba/log.%m
    max log size = 1000
    syslog only = yes
    panic action = /usr/share/samba/panic-action %d
    encrypt passwords = true
    passdb backend = tdbsam
    obey pam restrictions = no
    unix password sync = no
    passwd program = /usr/bin/passwd %u
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    pam password change = yes
    socket options = TCP_NODELAY IPTOS_LOWDELAY
    guest account = nobody
    load printers = no
    disable spoolss = yes
    printing = bsd
    printcap name = /dev/null
    unix extensions = yes
    wide links = no
    create mask = 0777
    directory mask = 0777
    map to guest = Bad User
    use sendfile = yes
    aio read size = 16384
    aio write size = 16384
    null passwords = no
    local master = yes
    time server = no
    wins support = no
    #======================= Share Definitions =======================
    [Server]
    path = /srv/dev-disk-by-label-Server
    guest ok = yes
    guest only = yes
    read only = no
    browseable = yes
    inherit acls = yes
    inherit permissions = no
    ea support = no
    store dos attributes = no
    vfs objects =
    printable = no
    create mask = 0664
    force create mode = 0664
    directory mask = 0775
    force directory mode = 0775
    hide special files = yes
    follow symlinks = yes
    hide dot files = yes
    [Media]
    path = /srv/dev-disk-by-label-Media
    guest ok = yes
    guest only = yes
    read only = no
    browseable = yes
    inherit acls = yes
    inherit permissions = no
    ea support = no
    store dos attributes = no
    vfs objects =
    printable = no
    create mask = 0664
    force create mode = 0664
    directory mask = 0775
    force directory mode = 0775
    hide special files = yes
    follow symlinks = yes
    hide dot files = yes



    root@openmediavault:/srv# ps aux |grep smb
    root 17006 0.0 0.0 12728 2280 pts/0 S+ 16:17 0:00 grep smb



    root@openmediavault:/srv# systemctl status smbd -l
    ● smbd.service - LSB: start Samba SMB/CIFS daemon (smbd)
    Loaded: loaded (/etc/init.d/smbd)
    Active: active (exited) since Sun 2017-12-10 16:13:29 MST; 4min 26s ago


    Dec 10 16:13:29 openmediavault smbd[16497]: Starting SMB/CIFS daemon: smbd.
    Dec 10 16:13:29 openmediavault systemd[1]: Started LSB: start Samba SMB/CIFS daemon (smbd).



    root@openmediavault:/srv# systemctl status nmbd -l
    ● nmbd.service - LSB: start Samba NetBIOS nameserver (nmbd)
    Loaded: loaded (/etc/init.d/nmbd)
    Active: active (exited) since Sun 2017-12-10 16:13:30 MST; 4min 28s ago


    Dec 10 16:13:30 openmediavault nmbd[16549]: Starting NetBIOS name server: nmbd.
    Dec 10 16:13:30 openmediavault systemd[1]: Started LSB: start Samba NetBIOS nameserver (nmbd).



    root@openmediavault:/srv# smbstatus


    Samba version 4.2.14-Debian
    PID Username Group Machine Protocol Version
    ------------------------------------------------------------------------------


    Service pid machine Connected at
    -------------------------------------------------------


    /var/run/samba/locking.tdb not initialised
    This is normal if an SMB client has never connected to your server.

    • Offizieller Beitrag

    The smb.conf looks ok, except it doesnt have any privileges set up (login control access). Go to shared folder section and select these folders and add some users you want to allow access. To discard any dns issues just the ip address of omv in win10 in the location bar


    \\IPNAS


    Also as it has been mentioned in several forums w10 recently deactivated smb1 support in an update. So maybe add


    server min protocol = SMB2


    in the extra options in general

  • Still nothing. Here is the ouput:



    root@openmediavault:~# ps axf | grep smbd
    9376 pts/0 S+ 0:00 \_ grep smbd



    root@openmediavault:~# systemctl start smbd



    root@openmediavault:~# systemctl status smbd -l
    ● smbd.service - LSB: start Samba SMB/CIFS daemon (smbd)
    Loaded: loaded (/etc/init.d/smbd)
    Active: active (exited) since Sun 2017-12-10 21:15:29 MST; 2min 8s ago


    Dec 10 21:15:29 openmediavault smbd[9198]: Starting SMB/CIFS daemon: smbd.
    Dec 10 21:15:29 openmediavault systemd[1]: Started LSB: start Samba SMB/CIFS daemon (smbd).
    Dec 10 21:15:34 openmediavault systemd[1]: Started LSB: start Samba SMB/CIFS daemon (smbd).
    Dec 10 21:17:35 openmediavault systemd[1]: Started LSB: start Samba SMB/CIFS daemon (smbd).

  • Same outcome. Nothing happening. I am running OMV on a USB 3.0. But, I've been running it on flash drives since I started running OMV about 6 years ago. I posted the cat /etc/init.d/smbd below this time because I thought maybe the init script is incorrect?



    root@openmediavault:~# systemctl unmask smbd


    root@openmediavault:~# systemctl start smbd


    root@openmediavault:~# ps axf | grep smbd
    4046 pts/0 S+ 0:00 \_ grep smbd


    root@openmediavault:~# systemctl status smbd -l
    ● smbd.service - LSB: start Samba SMB/CIFS daemon (smbd)
    Loaded: loaded (/etc/init.d/smbd)
    Active: active (exited) since Mon 2017-12-11 10:01:08 MST; 8s ago
    Process: 4033 ExecStart=/etc/init.d/smbd start (code=exited, status=0/SUCCESS)


    Dec 11 10:01:08 openmediavault smbd[4033]: Starting SMB/CIFS daemon: smbd.
    Dec 11 10:01:08 openmediavault systemd[1]: Started LSB: start Samba SMB/CIFS daemon (smbd).





    root@openmediavault:~# cat /etc/init.d/smbd
    #!/bin/sh


    ### BEGIN INIT INFO
    # Provides: smbd
    # Required-Start: $network $local_fs $remote_fs
    # Required-Stop: $network $local_fs $remote_fs
    # Default-Start: 2 3 4 5
    # Default-Stop: 0 1 6
    # Should-Start: slapd cups
    # Should-Stop: slapd cups
    # Short-Description: start Samba SMB/CIFS daemon (smbd)
    ### END INIT INFO



    PIDDIR=/var/run/samba
    SMBDPID=$PIDDIR/smbd.pid


    # clear conflicting settings from the environment
    unset TMPDIR


    # See if the daemons are there
    test -x /usr/sbin/smbd || exit 0


    . /lib/lsb/init-functions


    case $1 in
    start)
    if init_is_upstart; then
    exit 1
    fi
    SERVER_ROLE=`samba-tool testparm --parameter-name="server role" 2>/dev/null | tail -1`
    if [ "$SERVER_ROLE" = "active directory domain controller" ]; then
    exit 0
    fi


    log_daemon_msg "Starting SMB/CIFS daemon" smbd
    # Make sure we have our PIDDIR, even if it's on a tmpfs
    install -o root -g root -m 755 -d $PIDDIR


    if ! start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/smbd -- -D; then
    log_end_msg 1
    exit 1
    fi


    log_end_msg 0
    ;;
    stop)
    if init_is_upstart; then
    exit 0
    fi


    log_daemon_msg "Stopping SMB/CIFS daemon" smbd


    start-stop-daemon --stop --quiet --pidfile $SMBDPID
    # Wait a little and remove stale PID file
    sleep 1
    if [ -f $SMBDPID ] && ! ps h `cat $SMBDPID` > /dev/null
    then
    # Stale PID file, remove it (should be removed by
    # smbd itself IMHO).
    rm -f $SMBDPID
    fi


    log_end_msg 0


    ;;
    reload)
    log_daemon_msg "Reloading /etc/samba/smb.conf" smbd


    start-stop-daemon --stop --quiet --signal HUP --pidfile $SMBDPID


    log_end_msg 0
    ;;
    restart|force-reload)
    if init_is_upstart; then
    exit 1
    fi
    $0 stop
    sleep 1
    $0 start
    ;;
    status)
    status_of_proc -p $SMBDPID /usr/sbin/smbd smbd
    exit $?
    ;;
    *)
    echo "Usage: /etc/init.d/smbd {start|stop|reload|restart|force-reload|status}"
    exit 1
    ;;
    esac


    exit 0

  • But, I've been running it on flash drives since I started running OMV about 6 years ago

    All flash media will die eventually (as every other hardware too). Details (why dumb thumb drives are somewhat special especially when longer used). And then I would take a look into the logfiles (/var/log/syslog and of course Samba logs if the daemons fail to start) instead of config files or start scripts. Also


    Code
    dmesg | curl -F 'sprunge=<-' http://sprunge.us

    And if there's something suspicious I would check whole OS installation for corruption (please use search bar above and search for 'dpkg verify')

  • Here are the various output from these commands.


    No clue what this is but here you go:



    From syslog:




    I enabled SMB/CIFS "full" logging but haven't gotten any logs yet.

    Code
    root@openmediavault:/var/log/samba# cd /var/log/samba
    root@openmediavault:/var/log/samba# ls -l
    total 0


    When I try go access this info via the OMV web GUI, I get this error:

    Code
    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; export SYSTEMD_COLORS=0; journalctl --quiet --no-pager --priority='notice' SYSLOG_FACILITY=23 SYSLOG_IDENTIFIER='smbd_audit' --output=short 1>/tmp/logfile3E0znv 2>&1' with exit code '1':
  • Here is the out of smbd -F -d 3 -S:

  • That worked, finally! But, lots of errors, and the connection is slow.


    And, as soon as I ctrl-c or exit the SSH connection, the network connection closes immediately.

  • I renamed start-stop-daemon start-stop-daemon.REAL as stated in the link you sent. I then tried restarting the services, but smbd failed.



    • Offizieller Beitrag

    Don’t know what to tell you. Is the system completely up to date ?


    I would recommend you then try to install plain Debian from iso. Install all the Debian updates and finally install Omv on top.
    Use the netinst iso or full one just select ssh server nothing else, no desktop anything.
    Make sure also data disks are disconnected to avoid any overwrite or format mistake.

Jetzt mitmachen!

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