CIFS sharing stopped working

Status
Not open for further replies.

Bernard Mentink

Contributor
Joined
Apr 2, 2016
Messages
193
Hi,

I have noticed CIFS sharing has stopped working for no apparent reason.
(not visible on Windoze or Linux machines)

I have tried restarting the CIFS service and even restarting the server, nothing works.

What can I do to debug this.

I tried setting up a WebDave server to temporarily share those files, but that does not work either.
(authentication fails using webdave user and password I setup)

I can get at the shares via NFS but I need CIFS to work for the windoze boxen.

.... so I am stuck
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
First post the specs of your machine per forums rules along with what build you are running.

Then go to the CLI and type "smbstatus". Post the output here in code tags.
 

Bernard Mentink

Contributor
Joined
Apr 2, 2016
Messages
193
Code:
BuildFreeNAS-9.10-STABLE-201606270534 (dd17351)
PlatformIntel(R) Core(TM) i3-6100 CPU @ 3.70GHz
Memory16284MB


Code:
Samba version 4.3.6-GIT-UNKNOWN
PID     Username      Group         Machine            Protocol Version       
------------------------------------------------------------------------------

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

No locked files
 

Bernard Mentink

Contributor
Joined
Apr 2, 2016
Messages
193
Code:
BuildFreeNAS-9.10-STABLE-201606270534 (dd17351)
PlatformIntel(R) Core(TM) i3-6100 CPU @ 3.70GHz
Memory16284MB


Code:
Samba version 4.3.6-GIT-UNKNOWN
PID     Username      Group         Machine            Protocol Version       
------------------------------------------------------------------------------

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

No locked files
 

Bernard Mentink

Contributor
Joined
Apr 2, 2016
Messages
193
Oops, I pushed the button once and got 4 posts
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478

Bernard Mentink

Contributor
Joined
Apr 2, 2016
Messages
193
Ok, will try and dig out the specs of my machine, it is a custom build.
(not as easy as I would like, as I don't have the original packaging material for the server build I did, I will have to look through all my receipts)

EDIT: See signature for specs

I did nothing different when the CIFS shares stopped working, one day they where fine, the next they were not. No power cuts, no reboots, no server restarts, no upgrades)

Tried rebooting clients(both Windoze and Linux) .. nada
 
Last edited:

Bernard Mentink

Contributor
Joined
Apr 2, 2016
Messages
193
anyone have any debugging suggestions?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Lets start with a simple 'zpool status' and also see what errors you have in /var/log/messages.
 

Bernard Mentink

Contributor
Joined
Apr 2, 2016
Messages
193
Zpool status:
Code:
pool: freenas-boot
state: ONLINE
  scan: scrub repaired 0 in 0h0m with 0 errors on Sun Jul 31 03:45:57 2016
config:

    NAME        STATE     READ WRITE CKSUM
    freenas-boot  ONLINE       0     0     0
      da0p2     ONLINE       0     0     0

errors: No known data errors

  pool: myvolume
state: ONLINE
  scan: scrub repaired 0 in 1h15m with 0 errors on Sun Jul 31 01:15:21 2016
config:

    NAME                                            STATE     READ WRITE CKSUM
    myvolume                                        ONLINE       0     0     0
      raidz1-0                                      ONLINE       0     0     0
        gptid/40bcdf65-04e9-11e6-b34c-ac162d0caf04  ONLINE       0     0     0
        gptid/4128469f-04e9-11e6-b34c-ac162d0caf04  ONLINE       0     0     0
        gptid/3c82c8cb-5060-11e6-b31e-305a3ac83b29  ONLINE       0     0     0

errors: No known data errors


testparm:

Code:
Load smb config files from /usr/local/etc/smb4.conf
WARNING: The "null passwords" option is deprecated
Processing section "[Media]"
Processing section "[echo_backup]"
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
    dos charset = CP437
    server string = FreeNAS Server
    server role = standalone server
    security = USER
    map to guest = Bad User
    null passwords = Yes
    obey pam restrictions = Yes
    logging = file
    max log size = 51200
    server max protocol = SMB2
    max protocol = SMB2
    protocol = SMB2
    time server = Yes
    deadtime = 15
    kernel change notify = No
    max open files = 468956
    hostname lookups = Yes
    load printers = No
    printcap name = /dev/null
    disable spoolss = Yes
    lm announce = Yes
    dns proxy = No
    pid directory = /var/run/samba
    panic action = /usr/local/libexec/samba/samba-backtrace
    nsupdate command = /usr/local/bin/samba-nsupdate -g
    idmap config *: range = 90000001-100000000
    idmap config * : backend = tdb
    acl allow execute always = Yes
    create mask = 0666
    directory mask = 0777
    directory mode = 0777
    ea support = Yes
    directory name cache size = 0
    store dos attributes = Yes
    strict locking = No
    dos filemode = Yes


[Media]
    path = /mnt/myvolume/mymedia
    guest ok = Yes
    veto files = /.snapshot/.windows/.mac/.zfs/
    vfs objects = zfs_space zfsacl aio_pthread streams_xattr
    zfsacl:acesort = dontcare
    nfs4:chown = true
    nfs4:acedup = merge
    nfs4:mode = special


[echo_backup]
    path = /mnt/myvolume/echo_backup
    read only = No
    guest ok = Yes
    veto files = /.snapshot/.windows/.mac/.zfs/
    vfs objects = zfs_space zfsacl aio_pthread streams_xattr
    zfsacl:acesort = dontcare
    nfs4:chown = true
    nfs4:acedup = merge
    nfs4:mode = special


The only things of note in /var/log/messages are hundreds of these:
Aug 9 02:49:49 freenas alert.py: [freenasOS.Configuration:624] Unable to load https://web.ixsystems.com/updates/ix_crl.pem: Host web.ixsystems.com returned an invalid certificate ([SSL] internal error (_ssl.c:590))
 

profwalken

Patron
Joined
Nov 19, 2013
Messages
410
Hi ,
have probably the same issue, CIFS is running , but the server is not seen on all the windows computer.(Windows 7 to W10, 64 bits)
The maps done with net use command are working, but if i refresh the screen i have a red cross on all the maps.

also if i use the \\servername command shares are all available.

I'm now running freenas 9.10.1 version , nothing change on freenas configuration side but i applied update when i received mail to do.

Before perhaps one or two update all was working fine
 

Bernard Mentink

Contributor
Joined
Apr 2, 2016
Messages
193
An update:

If I Map a network drive in a Win 7 box to: \\server\share, it pops up a box wanting username and password, it did not do that before, the CIFS share is for nobody, so it should not be doing authentication .. and I too have red crosses on my old drive maps.
 
Last edited:

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
An update:

If I Map a network drive in a Win 7 box to: \\server\share, it pops up a box wanting username and password, it did not do that before, the CIFS share is for nobody, so it should not be doing authentication .. and I too have red crosses on my old drive maps.

Perhaps it should not be doing authentication. Samba will only map to the guest user if the username of the user account (typically the windows account) does not exist on the samba server.

Post output of following commands:
  • getfacl /mnt/myvolume/mymedia
  • getfacl /mnt/myvolume/echo_backup

In the meantime, try checking the box "guest only" on your samba share then reboot your windows client.
 

Bernard Mentink

Contributor
Joined
Apr 2, 2016
Messages
193
Code:
getfacl /mnt/myvolume/mymedia
# file: /mnt/myvolume/mymedia
# owner: root
# group: wheel
            owner@:-w-p----------:-------:allow
            group@:-w-p----------:-------:deny
            owner@:rwxp--aARWcCos:-------:allow
            group@:r-x---a-R-c--s:-------:allow
         everyone@:rwxp--a-R-c--s:-------:allow


Code:
getfacl /mnt/myvolume/echo_backup
# file: /mnt/myvolume/echo_backup
# owner: webdav
# group: webdav
            owner@:-w-p----------:-------:allow
            group@:-w-p----------:-------:deny
            owner@:rwxp--aARWcCos:-------:allow
            group@:r-x---a-R-c--s:-------:allow
         everyone@:rwxp--a-R-c--s:-------:allow


Ticking "guest only" did not help
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
You say NFS works. I assume you're not trying to run the NFS service on the same shares as CIFS at the same time? That could cause problems.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Code:
getfacl /mnt/myvolume/mymedia
# file: /mnt/myvolume/mymedia
# owner: root
# group: wheel
            owner@:-w-p----------:-------:allow
            group@:-w-p----------:-------:deny
            owner@:rwxp--aARWcCos:-------:allow
            group@:r-x---a-R-c--s:-------:allow
         everyone@:rwxp--a-R-c--s:-------:allow


Code:
getfacl /mnt/myvolume/echo_backup
# file: /mnt/myvolume/echo_backup
# owner: webdav
# group: webdav
            owner@:-w-p----------:-------:allow
            group@:-w-p----------:-------:deny
            owner@:rwxp--aARWcCos:-------:allow
            group@:r-x---a-R-c--s:-------:allow
         everyone@:rwxp--a-R-c--s:-------:allow


Ticking "guest only" did not help
In the webgui, create a user named something like 'smbguest' and set a password.
Change your media dataset (again in the webgui) so that it is owned by 'smbguest'
Go into your cifs config and change the guest user from 'nobody' to 'smbguest'.
Go into the share config and unchecked 'apply default permissions' and hit 'ok', then check it and hit 'ok'. (Ie force the webgui to reset permissions).
 

Bernard Mentink

Contributor
Joined
Apr 2, 2016
Messages
193
In the webgui, create a user named something like 'smbguest' and set a password.
Change your media dataset (again in the webgui) so that it is owned by 'smbguest'
Go into your cifs config and change the guest user from 'nobody' to 'smbguest'.
Go into the share config and unchecked 'apply default permissions' and hit 'ok', then check it and hit 'ok'. (Ie force the webgui to reset permissions).
Thanks did that .... all good.

EDIT: Spoke too soon, I can see the shares from my Linux boxes, but can't still see them on Windoze.
When I scan the network, only the windoze PC shows up. (In my case ECHO_PC)
When I try to map a network drive manually to \\freenas\mnt\myvolume\echo_backup, the it tries to map it under ECHO_PC .... I HATE WINDOZE
 
Last edited:

Bernard Mentink

Contributor
Joined
Apr 2, 2016
Messages
193
I have made sure the shares have Windoze permissions ...
Anyone?
 

Bernard Mentink

Contributor
Joined
Apr 2, 2016
Messages
193
Currently my share permissions are:
Code:
# file: /mnt/myvolume/echo_backup/
# owner: bmentink
# group: bmentink
            owner@:rwxpDdaARWcCos:fd-----:allow
            group@:rwxpDdaARWcCos:fd-----:allow
         everyone@:r-x---a-R-c---:fd-----:allow


and cifs uses bmentink:bmentink .... but still not visable anywhere ..

I have the domain setup as WORKGROUP, but the domain is not seen in the windoz clients either ..
 
Status
Not open for further replies.
Top