Меню

Smb service failed to start freenas ошибка

  • #1

My hardware had a power disruption. Since then I get SMB service failed to start.

Last time, I got the advise of running chmod 0750 /var/db/samba4/winbindd_privileged and it fixed the problem. This time I run it and get the error message:

root@freenas[/]# chmod 777 /var/db/samba4/winbindd_privileged
chmod: /var/db/samba4/winbindd_privileged: Unknown error: 122

dlavigne

Guest


anodos


  • #3

My hardware had a power disruption. Since then I get SMB service failed to start.

Last time, I got the advise of running chmod 0750 /var/db/samba4/winbindd_privileged and it fixed the problem. This time I run it and get the error message:

root@freenas[/]# chmod 777 /var/db/samba4/winbindd_privileged
chmod: /var/db/samba4/winbindd_privileged: Unknown error: 122

Can you post output of smbd -i?

  • #4

root@freenas[~]# smbd -i
smbd version 4.7.0-GIT-ffd9576215e-FreeNAS started.
Copyright Andrew Tridgell and the Samba Team 1992-2017
error opening config file ‘/usr/local/etc/smb4.conf’

anodos


  • #5

root@freenas[~]# smbd -i
smbd version 4.7.0-GIT-ffd9576215e-FreeNAS started.
Copyright Andrew Tridgell and the Samba Team 1992-2017
error opening config file ‘/usr/local/etc/smb4.conf’

Run python /usr/local/libexec/nas/generate_smb4_conf.py and post output

  • #6

root@freenas[~]# python /usr/local/libexec/nas/generate_smb4_conf.py
Traceback (most recent call last):
File «/usr/local/libexec/nas/generate_smb4_conf.py», line 1740, in <module>
main()
File «/usr/local/libexec/nas/generate_smb4_conf.py», line 1691, in main
smb4_setup(client)
File «/usr/local/libexec/nas/generate_smb4_conf.py», line 1335, in smb4_setup
os.chmod(privatedir, 0o700)
OSError: [Errno 122] Unknown error: 122: ‘/var/db/samba4/private’

anodos


  • #7

root@freenas[~]# python /usr/local/libexec/nas/generate_smb4_conf.py
Traceback (most recent call last):
File «/usr/local/libexec/nas/generate_smb4_conf.py», line 1740, in <module>
main()
File «/usr/local/libexec/nas/generate_smb4_conf.py», line 1691, in main
smb4_setup(client)
File «/usr/local/libexec/nas/generate_smb4_conf.py», line 1335, in smb4_setup
os.chmod(privatedir, 0o700)
OSError: [Errno 122] Unknown error: 122: ‘/var/db/samba4/private’

What output do you see if your chmod 0700 /var/db/samba4/private?

  • #8

root@freenas[~]# chmod 0700 /var/db/samba4/private
chmod: /var/db/samba4/private: Unknown error: 122

anodos


  • #9

root@freenas[~]# chmod 0700 /var/db/samba4/private
chmod: /var/db/samba4/private: Unknown error: 122

stat /var/db/samba4/private
post output of zfs list as well.

  • #10

root@freenas[~]# stat /var/db/samba4/private
stat: /var/db/samba4/private: stat: Unknown error: 122

root@freenas[~]# zfs list
NAME USED AVAIL REFER MOUNTPOINT
RAIDZ-14TB 2.88T 11.2T 2.86T /mnt/RAIDZ-14TB
RAIDZ-14TB/.system 72.3M 11.2T 1.17M legacy
RAIDZ-14TB/.system/configs-1c36823397d74dbc9e7d4fbefe8b455e 5.97M 11.2T 5.97M legacy
RAIDZ-14TB/.system/cores 7.80M 11.2T 7.80M legacy
RAIDZ-14TB/.system/rrd-1c36823397d74dbc9e7d4fbefe8b455e 24.7M 11.2T 24.7M legacy
RAIDZ-14TB/.system/samba4 346K 11.2T 346K legacy
RAIDZ-14TB/.system/syslog-1c36823397d74dbc9e7d4fbefe8b455e 32.2M 11.2T 32.2M legacy
RAIDZ-14TB/.system/webui 117K 11.2T 117K legacy
RAIDZ-14TB/Upload 20.9G 11.2T 20.9G /mnt/RAIDZ-14TB/Upload
RAIDZ2-6TB 3.05T 2.05T 3.05T /mnt/RAIDZ2-6TB
freenas-boot 1.43G 17.5G 64K none
freenas-boot/ROOT 1.43G 17.5G 29K none
freenas-boot/ROOT/Initial-Install 1K 17.5G 760M legacy
freenas-boot/ROOT/default 1.43G 17.5G 1.43G legacy

anodos


  • #11

Are you able to stat /mnt/RAIDZ-14TB/.system/samba4 ?

anodos


  • #12

Can you post output of ls -l /var/db/

  • #13

Are you able to stat /mnt/RAIDZ-14TB/.system/samba4 ?

it does not start and says Service failed to start

SMB service failed to start

  • #14

Can you post output of ls -l /var/db/

root@freenas[~]# ls -l /var/db/
total 2103
drwxr-xr-x 2 root wheel 64 Mar 16 05:50 collectd
———- 1 root wheel 366 Mar 16 09:49 dhclient.leases.vtnet0
drwx—— 2 operator operator 0 Jan 20 15:11 entropy
drwx—— 2 root wheel 0 Jan 20 15:11 freebsd-update
drwx—— 2 root wheel 0 Jan 20 15:11 hyperv
drwx—— 2 root wheel 0 Jan 20 15:11 ipf
-rw-r—r— 1 nobody wheel 0 Jan 20 15:10 locate.database
drwxr-x— 3 netdata netdata 128 Jan 20 15:10 netdata
drwx—— 2 root wheel 0 Jan 20 15:11 ntp
-rw-r—r— 1 root wheel 6 Mar 16 06:50 ntpd.drift
-rw-r—r— 1 root wheel 10408 Jan 20 15:10 ntpd.leap-seconds.list
drwxrwx— 2 root uucp 0 Jan 20 15:11 nut
drwxr-xr-x 2 root wheel 192 Jan 20 15:10 pkg
drwxr-xr-x 2 root wheel 0 Jan 20 15:11 ports
drwxr-xr-x 2 root wheel 0 Jan 20 15:11 portsnap
lrwxr-xr-x 1 root wheel 21 Mar 16 05:50 samba4 -> /var/db/system/samba4
drwxr-xr-x 3 root wheel 64 Jan 20 15:11 samba4.20190316055035
-rw-r—r— 1 root wheel 2097920 Jan 20 15:10 services.db
drwxr-xr-x 2 root wheel 0 Mar 16 05:50 sss
drwxr-xr-x 2 root wheel 0 Mar 16 05:50 sss_mc
drwx—x—x 3 root wheel 64 Jan 20 15:11 sudo
srwxr-xr-x 1 root wheel 0 Mar 16 05:50 syslog-ng.ctl
-rw——- 1 root wheel 16384 Mar 16 09:49 syslog-ng.persist
drwxrwxr-x+ 9 root wheel 11 Mar 16 09:46 system
drwxr-xr-x 3 root wheel 64 Jan 20 15:11 zfsd
-rw-r—r— 1 root wheel 20 Mar 16 05:50 zoneinfo

anodos


  • #15

it does not start and says Service failed to start

SMB service failed to start

stat is a command stat /mnt/RAIDZ-14TB/.system/samba4
Also post output of zfs get all RAIDZ-14TB/.system/samba4

  • #16

stat is a command stat /mnt/RAIDZ-14TB/.system/samba4
Also post output of zfs get all RAIDZ-14TB/.system/samba4


root@freenas[/]# stat /mnt/RAIDZ-14TB/.system/samba4
stat: /mnt/RAIDZ-14TB/.system/samba4: stat: No such file or directory

root@freenas[/mnt/RAIDZ-14TB]# zfs get all RAIDZ-14TB/.system/samba4
NAME PROPERTY VALUE SOURCE
RAIDZ-14TB/.system/samba4 type filesystem —
RAIDZ-14TB/.system/samba4 creation Sat Jan 26 15:22 2019 —
RAIDZ-14TB/.system/samba4 used 346K —
RAIDZ-14TB/.system/samba4 available 11.2T —
RAIDZ-14TB/.system/samba4 referenced 346K —
RAIDZ-14TB/.system/samba4 compressratio 11.01x —
RAIDZ-14TB/.system/samba4 mounted yes —
RAIDZ-14TB/.system/samba4 quota none default
RAIDZ-14TB/.system/samba4 reservation none default
RAIDZ-14TB/.system/samba4 recordsize 128K default
RAIDZ-14TB/.system/samba4 mountpoint legacy local
RAIDZ-14TB/.system/samba4 sharenfs off default
RAIDZ-14TB/.system/samba4 checksum on default
RAIDZ-14TB/.system/samba4 compression lz4 inherited from RAIDZ-14TB
RAIDZ-14TB/.system/samba4 atime on default
RAIDZ-14TB/.system/samba4 devices on default
RAIDZ-14TB/.system/samba4 exec on default
RAIDZ-14TB/.system/samba4 setuid on default
RAIDZ-14TB/.system/samba4 readonly off default
RAIDZ-14TB/.system/samba4 jailed off default
RAIDZ-14TB/.system/samba4 snapdir hidden default
RAIDZ-14TB/.system/samba4 aclmode passthrough inherited from RAIDZ-14TB
RAIDZ-14TB/.system/samba4 aclinherit passthrough inherited from RAIDZ-14TB
RAIDZ-14TB/.system/samba4 canmount on default
RAIDZ-14TB/.system/samba4 xattr off temporary
RAIDZ-14TB/.system/samba4 copies 1 default
RAIDZ-14TB/.system/samba4 version 5 —
RAIDZ-14TB/.system/samba4 utf8only off —
RAIDZ-14TB/.system/samba4 normalization none —
RAIDZ-14TB/.system/samba4 casesensitivity sensitive —
RAIDZ-14TB/.system/samba4 vscan off default
RAIDZ-14TB/.system/samba4 nbmand off default
RAIDZ-14TB/.system/samba4 sharesmb off default
RAIDZ-14TB/.system/samba4 refquota none default
RAIDZ-14TB/.system/samba4 refreservation none default
RAIDZ-14TB/.system/samba4 primarycache all default
RAIDZ-14TB/.system/samba4 secondarycache all default
RAIDZ-14TB/.system/samba4 usedbysnapshots 0 —
RAIDZ-14TB/.system/samba4 usedbydataset 346K —
RAIDZ-14TB/.system/samba4 usedbychildren 0 —
RAIDZ-14TB/.system/samba4 usedbyrefreservation 0 —
RAIDZ-14TB/.system/samba4 logbias latency default
RAIDZ-14TB/.system/samba4 dedup off default
RAIDZ-14TB/.system/samba4 mlslabel —
RAIDZ-14TB/.system/samba4 sync standard default
RAIDZ-14TB/.system/samba4 refcompressratio 11.01x —
RAIDZ-14TB/.system/samba4 written 346K —
RAIDZ-14TB/.system/samba4 logicalused 1.37M —
RAIDZ-14TB/.system/samba4 logicalreferenced 1.37M —
RAIDZ-14TB/.system/samba4 volmode default default
RAIDZ-14TB/.system/samba4 filesystem_limit none default
RAIDZ-14TB/.system/samba4 snapshot_limit none default
RAIDZ-14TB/.system/samba4 filesystem_count none default
RAIDZ-14TB/.system/samba4 snapshot_count none default
RAIDZ-14TB/.system/samba4 redundant_metadata all default
RAIDZ-14TB/.system/samba4 org.freebsd.ioc:active yes inherited from RAIDZ-14TB

anodos


  • #17

Right, I was having a bit of Saturday brain. the .system dataset is mounted under /var/db/system. Can you post the output of mount?

  • #18

At least it’s Saturday, during the day time for me.

freenas-boot/ROOT/default on / (zfs, local, noatime, nfsv4acls)
devfs on /dev (devfs, local, multilabel)
tmpfs on /etc (tmpfs, local)
tmpfs on /mnt (tmpfs, local)
tmpfs on /var (tmpfs, local)
fdescfs on /dev/fd (fdescfs)
RAIDZ-14TB on /mnt/RAIDZ-14TB (zfs, local, nfsv4acls)
RAIDZ-14TB/Upload on /mnt/RAIDZ-14TB/Upload (zfs, local, nfsv4acls)
RAIDZ2-6TB on /mnt/RAIDZ2-6TB (zfs, local, nfsv4acls)
RAIDZ-14TB/.system on /var/db/system (zfs, local, nfsv4acls)
RAIDZ-14TB/.system/cores on /var/db/system/cores (zfs, local, nfsv4acls)
RAIDZ-14TB/.system/samba4 on /var/db/system/samba4 (zfs, local, nfsv4acls)
RAIDZ-14TB/.system/syslog-1c36823397d74dbc9e7d4fbefe8b455e on /var/db/system/syslog-1c36823397d74dbc9e7d4fbefe8b455e (zfs, local, nfsv4acls)
RAIDZ-14TB/.system/rrd-1c36823397d74dbc9e7d4fbefe8b455e on /var/db/system/rrd-1c36823397d74dbc9e7d4fbefe8b455e (zfs, local, nfsv4acls)
RAIDZ-14TB/.system/configs-1c36823397d74dbc9e7d4fbefe8b455e on /var/db/system/configs-1c36823397d74dbc9e7d4fbefe8b455e (zfs, local, nfsv4acls)
RAIDZ-14TB/.system/webui on /var/db/system/webui (zfs, local, nfsv4acls)

anodos


  • #19

Now output of ls -lo /var/db/system

  • #20

root@freenas[/mnt/RAIDZ-14TB]# ls -loTH /var/db/system
total 26
drwxrwxr-x+ 3 root wheel uarch 3 Feb 2 03:45:01 2019 configs-1c36823397d74dbc9e7d4fbefe8b455e
drwxrwxr-x+ 2 root wheel uarch 5 Mar 11 04:48:51 2019 cores
drwxrwxr-x+ 3 root wheel uarch 4 Feb 3 18:33:43 2019 ixdiagnose
-rwxrwxr-x 1 root wheel uarch 0 Jan 26 15:22:01 2019 nfs-stablerestart
-rwxrwxr-x 1 root wheel uarch 0 Jan 26 15:22:01 2019 nfs-stablerestart.bak
drwxrwxr-x+ 4 root wheel uarch 5 Mar 16 05:50:39 2019 rrd-1c36823397d74dbc9e7d4fbefe8b455e
drwxr-xr-x+ 4 root wheel uarch 14 Mar 9 15:26:44 2019 samba4
drwxrwxr-x+ 3 root wheel uarch 3 Jan 26 15:22:01 2019 syslog-1c36823397d74dbc9e7d4fbefe8b455e
drwxrwxr-x+ 2 root wheel uarch 2 Jan 26 15:22:00 2019 webui

  • Base System

  • General

  • Thread starter

    Th3RadMan

  • Start date

    Nov 8, 2018

  • #1

I was running freenas off an esxi vm and it was working fine. Then I transferred some data around, first freenas to a different data share on the esxi host. Then I moved the esxi host to a different usb stick and ever since I’ve had trouble. Now in freenas, I get the error «SMB service failed to start» when I try to enable the service. I have tried on 11.1 u6 and 11.2 with the exact same problem. Looking at the testparm command I didn’t see anything weird. I have messed with my pools permissions with no change either. The only way I can get smb to start is if I detach my pool and resart my system. It will work yp until I add a share. I haven’t found very much info about this issue except for people who are able to just restart their systems and it works.

Any ideas?

Specs
ESXI 6.7
Freenas 11.2
2X xeon 2670
Asus Z9PA-D8
128gb ddr3 ecc ram
norco 4224 chassis
intel X550-T2 NIC
Intel RES2SV240
LSI 9240-8i (flahed to 9211-8i it mode)
6 8TB WD white hdd’s
6 10TB WD white hdd’s
3 Samsung ssd’s
1 sandisk flash drive (boot)

SirDice

SirDice

Administrator

Staff member

Administrator

Moderator


  • #3

The only way I can get smb to start is if I detach my pool and resart my system. It will work yp until I add a share.

Definitely seems like a permission problem.

I’d raise logging verbosity for Samba (see smb.conf(5); either through

log level

or set something up using syslog), then try again and check the logfile(s) to find out what’s wrong.

  • Base System

  • General

  • This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.

SOLVED — edit at bottom


I’ve just installed my first FreeNAS system (FreeNAS-11.2-U4.1) and am completely inept on how to troubleshoot the system as SMB is not starting. As it’s a fresh install and I haven’t changed the configuration so I’m at a loss as to why it’s not functioning. Any helps for someone as clueless as I would be greatly appreciated.

running «service -e» returns a list that includes «/user/local/etc/rc.d/samba_server»

running «service samba_server start» returns

Performing sanity check on Samba configuration: OK
Starting nmbd.
smbd already running? (pid=8780).
winbindd already running? (pid=8788).

running «testparm» returns

rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)                                                           
Registered MSG_REQ_POOL_USAGE                                                                                                       
Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED                                                                                     
Load smb config files from /usr/local/etc/smb4.conf                                                                                 
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)                                                           
Processing section "[Share1]"                                                                                                       
Loaded services file OK.                                                                                                            
Server role: ROLE_STANDALONE

# Global parameters                                                                                                                 
[global]                                                                                                                            
    aio max threads = 2                                                                                                         
    deadtime = 15                                                                                                               
    disable spoolss = Yes                                                                                                       
    dns proxy = No                                                                                                              
    dos charset = CP437                                                                                                         
    hostname lookups = Yes                                                                                                      
    kernel change notify = No                                                                                                   
    lm announce = Yes                                                                                                           
    load printers = No                                                                                                          
    logging = file                                                                                                              
    map to guest = Bad User                                                                                                     
    max log size = 51200                                                                                                        
    max open files = 211214                                                                                                     
    nsupdate command = /usr/local/bin/samba-nsupdate -g                                                                         
    obey pam restrictions = Yes                                                                                                 
    printcap name = /dev/null                                                                                                   
    security = USER                                                                                                             
    server min protocol = SMB2_02                                                                                               
    server role = standalone server                                                                                             
    server string = FreeNAS Server                                                                                              
    time server = Yes                                                                                                           
    idmap config *: range = 90000001-100000000                                                                                  
    idmap config * : backend = tdb                                                                                              
    acl allow execute always = Yes                                                                                              
    create mask = 0666                                                                                                          
    directory mask = 0777                                                                                                       
    directory name cache size = 0                                                                                               
    dos filemode = Yes                                                                                                          
    strict locking = No                                                                                                         
                                                                                                                                
                                                                                                                                
[Share1]                                                                                                                            
    aio write size = 0                                                                                                          
    guest ok = Yes                                                                                                              
    path = "/mnt/Share/Share1"                                                                                                  
    read only = No                                                                                                              
    veto files = /.snapshot/.windows/.mac/.zfs/                                                                                 
    vfs objects = zfs_space zfsacl streams_xattr                                                                                
    zfsacl:acesort = dontcare                                                                                                   
    nfs4:chown = true                                                                                                           
    nfs4:acedup = merge                                                                                                         
    nfs4:mode = special

Thank you for your time.




Solution

For some reason even though SMB isn’t showing up as active (https://i.imgur.com/QFFndLT.png) It’s still running. It also wouldn’t show up in network in windows but I got access to it through typing \nasnamesharename (\freenasShare1 in my case). Typing in the IP or anything else didn’t seem to function for me.

Thanks to everyone for their pacience with someone who has no clue what they were doing.

SMB Daemon not starting anymore. Fix?

SMB Daemon not starting anymore. Fix?

I hope this is the right place to ask: For some reasons, my samba daemons are not running anymore on my ArchLinux (on a Pogoplug). When I try to start them it tells me:

Code: Select all
# systemctl enable smbd
Failed to enable unit: Unit file smbd.service does not exist.
# systemctl enable nmbd
Failed to enable unit: Unit file nmbd.service does not exist.

When I try to start smb.service, for example, I also get:

Code: Select all
Apr 27 13:05:43 alarm systemd[1]: Starting Samba SMB Daemon...
Apr 27 13:05:45 alarm systemd[1]: smb.service: Main process exited, code=exited, status=1/FAILURE
Apr 27 13:05:45 alarm systemd[1]: smb.service: Failed with result 'exit-code'.
Apr 27 13:05:45 alarm systemd[1]: Failed to start Samba SMB Daemon.

I already removed samba and reinstalled with a complete sync to samba 4.8.0-2, no change. pacman does not give out any errors and installs samba fine.

testparm gives:

Code: Select all
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[root$]"
Processing section "[usb]"
Processing section "[usb2]"
Loaded services file OK.
Server role: ROLE_STANDALONE

And status shows me:

Code: Select all
[root@alarm alarm]# systemctl status smb.service nmb.service
● smb.service - Samba SMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset:>
   Active: failed (Result: exit-code) since Fri 2018-04-27 15:26:20 CEST; 7s ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 1422 ExecStart=/usr/bin/smbd --foreground --no-process-group $SMBDOP>
 Main PID: 1422 (code=exited, status=1/FAILURE)

Apr 27 15:26:17 alarm systemd[1]: Starting Samba SMB Daemon...
Apr 27 15:26:20 alarm systemd[1]: smb.service: Main process exited, code=exited>
Apr 27 15:26:20 alarm systemd[1]: smb.service: Failed with result 'exit-code'.
Apr 27 15:26:20 alarm systemd[1]: Failed to start Samba SMB Daemon.

● nmb.service - Samba NMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/nmb.service; enabled; vendor preset:>
   Active: failed (Result: exit-code) since Fri 2018-04-27 15:26:17 CEST; 18s a>
     Docs: man:nmbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 1418 ExecStart=/usr/bin/nmbd --foreground --no-process-group $NMBDOP>
 Main PID: 1418 (code=exited, status=1/FAILURE)

● smb.service - Samba SMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2018-04-27 15:26:20 CEST; 7s ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 1422 ExecStart=/usr/bin/smbd --foreground --no-process-group $SMBDOPTIONS (code=exited>
 Main PID: 1422 (code=exited, status=1/FAILURE)

Apr 27 15:26:17 alarm systemd[1]: Starting Samba SMB Daemon...
Apr 27 15:26:20 alarm systemd[1]: smb.service: Main process exited, code=exited, status=1/FAILURE
Apr 27 15:26:20 alarm systemd[1]: smb.service: Failed with result 'exit-code'.
Apr 27 15:26:20 alarm systemd[1]: Failed to start Samba SMB Daemon.

● nmb.service - Samba NMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/nmb.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2018-04-27 15:26:17 CEST; 18s ago
     Docs: man:nmbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 1418 ExecStart=/usr/bin/nmbd --foreground --no-process-group $NMBDOPTIONS (code=exited>
 Main PID: 1418 (code=exited, status=1/FAILURE)

Any ideas?

basti007
 
Posts: 4
Joined: Sun Jul 23, 2017 11:38 am

Re: SMB Daemon not starting anymore. Fix?

Postby mwNas » Sun Apr 29, 2018 8:11 pm

Samba v4.8 is new and improved. The units were renamed. Try smb.service and nmb.service (start and enable).
Add to that I ran into a problem with polkit. After I downgraded and rebooted both work fine.

mwNas
 
Posts: 17
Joined: Sun Jul 19, 2015 8:28 pm

Re: SMB Daemon not starting anymore. Fix?

Postby basti007 » Tue May 01, 2018 8:01 pm

Don’t really know what you mean? As you can see above, I of course use the new names already. That’s where these errors are coming from. ;)

basti007
 
Posts: 4
Joined: Sun Jul 23, 2017 11:38 am

Re: SMB Daemon not starting anymore. Fix?

Postby WarheadsSE » Wed May 02, 2018 1:17 pm

My suggestion is to check the logs: /var/log/samba/smbd.log

Core Developer
Remember: Arch Linux ARM is entirely community donation supported!

WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm


Return to ARMv5

Who is online

Users browsing this forum: No registered users and 1 guest

Я только что обновил FreeNAS до 9.10, чтобы воспользоваться преимуществами новой версии Samba, которая якобы позволяет Final Cut Pro хранить свою библиотеку над SMB. Тем не менее, хотя я могу заставить AFP нормально работать с Mac, я не могу подключиться к общим папкам SMB.

в обоих случаях гостевой доступ отключен. Я создал учетную запись Пользователя на FreeNAS и могу аутентифицировать его при использовании AFP. Как только я включаю SMB, Finder (правильно, я считаю) заменяет общий ресурс AFP объявления с SMB из них. Тем не менее при попытке загрузить общий ресурс SMB, нажав на запись моего сервера в Finder, он говорит «сбой подключения» и нажав «подключиться как… сообщает:

операция не может быть завершена, так как не удается найти исходный элемент для «Photo_Vault».»

Я не вижу ничего плохого в моих настройках, но вы можете указать мне в правильном направлении, где даже начать отладку этого.

Я пробовал ограничение версиям SMB будет разрешено подключаться, чтобы узнать, поможет ли форсирование более новой версии( SMB3 или выше), но это только ухудшило ситуацию, в результате чего вместо этого появилось следующее сообщение:

возникла проблема с подключением к серверу «Беатрис».

Проверьте имя сервера или IP-адрес, затем повторите попытку. Если проблемы не исчезнут, обратитесь к системному администратору.

кстати: Zeroconf, кажется, работает штраф. Когда я выключаю SMB и использую AFP, Finder отлично подключается; кроме того, если я пытаюсь подключиться непосредственно к 192.168.1.30, он не работает точно так же, как при использовании записи Zeroconf (Беатрис.местный.) Я могу получить доступ к другим сетевым службам на Новой просто отлично (веб-интерфейс администратора, АФП и т. д.), использую ли я » beatrice.локальный » или IP-адрес.

обновление: Testparm-s не сообщал о каких-либо ошибках. Вот мой файл конфигурации (который должен быть по умолчанию из FreeNAS, я не редактировал его). Обратите внимание, что он включает ограничение, на которое должен использоваться протокол SMB, о котором я упоминал выше; я пробовал его как с этим, так и без него.

[global]
server min protocol = SMB3
server max protocol = SMB3_11
encrypt passwords = yes
dns proxy = no
strict locking = no
oplocks = yes
deadtime = 15
max log size = 51200
max open files = 231347
logging = file
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
getwd cache = yes
guest account = nobody
map to guest = Bad User
obey pam restrictions = yes
directory name cache size = 0
kernel change notify = no
panic action = /usr/local/libexec/samba/samba-backtrace
nsupdate command = /usr/local/bin/samba-nsupdate -g
server string = FreeNAS Server
ea support = yes
store dos attributes = yes
lm announce = yes
hostname lookups = yes
time server = yes
acl allow execute always = true
dos filemode = yes
multicast dns register = yes
domain logons = no
local master = yes
idmap config *: backend = tdb
idmap config *: range = 90000001-100000000
server role = standalone
netbios name = BEATRICE
workgroup = WORKGROUP
security = user
pid directory = /var/run/samba
create mask = 0666
directory mask = 0777
client ntlmv2 auth = yes
dos charset = CP437
unix charset = UTF-8
log level = 1

[Photo Vault]
path = /mnt/TheVault/Photo Vault
printable = no
veto files = /.snapshot/.windows/.mac/.zfs/
writeable = yes
browseable = yes
vfs objects = zfs_space zfsacl aio_pthread
hide dot files = yes
guest ok = no
nfs4:mode = special
nfs4:acedup = merge
nfs4:chown = true
zfsacl:acesort = dontcare

sudo systemctl start smb.service

sudo systemctl start smb.service
Job for smb.service failed because the control process exited with error code.
See "systemctl status smb.service" and "journalctl -xe" for details.

sudo systemctl start nmb.service

sudo systemctl start nmb.service
Job for nmb.service failed because the control process exited with error code.
See "systemctl status nmb.service" and "journalctl -xe" for details.

sudo systemctl enable smb.service

sudo systemctl enable nmb.service

smb.conf:

# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
#
# For a step to step guide on installing, configuring and using samba,
# read the Samba-HOWTO-Collection. This may be obtained from:
#  http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
#
# Many working examples of smb.conf files can be found in the
# Samba-Guide which is generated daily and can be downloaded from:
#  http://www.samba.org/samba/docs/Samba-Guide.pdf
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not made any basic syntactic errors.
#
#======================= Global Settings =====================================
[global]

# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
   workgroup = MYGROUP

# server string is the equivalent of the NT Description field
   server string = Samba Server

# Server role. Defines in which mode Samba will operate. Possible
# values are "standalone server", "member server", "classic primary
# domain controller", "classic backup domain controller", "active
# directory domain controller".
#
# Most people will want "standalone server" or "member server".
# Running as "active directory domain controller" will require first
# running "samba-tool domain provision" to wipe databases and create a
# new domain.
   server role = standalone server

# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
;   hosts allow = 192.168.1. 127.

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
;  guest account = pcguest

# this tells Samba to use a separate log file for each machine
# that connects
   log file = /var/log/samba/%m.log

# Put a capping on the size of the log files (in Kb).
   max log size = 50

# Specifies the Kerberos or Active Directory realm the host is part of
;   realm = MY_REALM

# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
;   passdb backend = tdbsam

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting.
# Note: Consider carefully the location in the configuration file of
#       this line.  The included file is read at that point.
;   include = /usr/local/samba/lib/smb.conf.%m

# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
   interfaces = 192.168.1.169/24 127.0.0.1

# Where to store roving profiles (only for Win95 and WinNT)
#        %L substitutes for this servers netbios name, %U is username
#        You must uncomment the [Profiles] share below
;   logon path = \%LProfiles%U

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
;   wins support = yes

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
#       Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
;   wins server = w.x.y.z

# WINS Proxy - Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one  WINS Server on the network. The default is NO.
;   wins proxy = yes

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The default is NO.
   dns proxy = no

# These scripts are used on a domain controller or stand-alone
# machine to add or delete corresponding unix accounts
;  add user script = /usr/sbin/useradd %u
;  add group script = /usr/sbin/groupadd %g
;  add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
;  delete user script = /usr/sbin/userdel %u
;  delete user from group script = /usr/sbin/deluser %u %g
;  delete group script = /usr/sbin/groupdel %g


#============================ Share Definitions
# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
;   comment = Network Logon Service
;   path = /usr/local/samba/lib/netlogon
;   guest ok = yes
;   writable = no
;   share modes = no


# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
;    path = /usr/local/samba/profiles
;    browseable = no
;    guest ok = yes

# This one is useful for people to share files
;[tmp]
;   comment = Temporary file space
;   path = /tmp
;   read only = no
;   public = yes

# A publicly accessible directory, but read only, except for people in
# the "staff" group
[Photos]
   comment = Photos directory.
   path = /photos
   public = no
   writable = yes
   write list = @photos

# Other examples.
#
# A private printer, usable only by fred. Spool data will be placed in fred's
# home directory. Note that fred must have write access to the spool directory,
# wherever it is.
;[fredsprn]
;   comment = Fred's Printer
;   valid users = fred
;   path = /homes/fred
;   printer = freds_printer
;   public = no
;   writable = no
;   printable = yes

# A private directory, usable only by fred. Note that fred requires write
# access to the directory.
;[fredsdir]
;   comment = Fred's Service
;   path = /usr/somewhere/private
;   valid users = fred
;   public = no
;   writable = yes
;   printable = no

# a service which has a different directory for each machine that connects
# this allows you to tailor configurations to incoming machines. You could
# also use the %U option to tailor it by user name.
# The %m gets replaced with the machine name that is connecting.
;[pchome]
;  comment = PC Directories
;  path = /usr/pc/%m
;  public = no
;  writable = yes

# A publicly accessible directory, read/write to all users. Note that all files
# created in the directory by users will be owned by the default user, so
# any user with access can delete any other user's files. Obviously this
# directory must be writable by the default user. Another user could of course
# be specified, in which case all files would be owned by that user instead.
;[public]
;   path = /usr/somewhere/else/public
;   public = yes
;   only guest = yes
;   writable = yes
;   printable = no

# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required.
;[myshare]
;   comment = Mary's and Fred's stuff
;   path = /usr/somewhere/shared
;   valid users = mary fred
;   public = no
;   writable = yes
;   printable = no
;   create mask = 0765

Last edited by broms (2020-01-06 23:47:11)

После обновления FreeNAS до версии 9.3 перестала работать служба CIFS
при ручном запуске из консоли ошибка:

Unable to open configuration file "/usr/local/etc/smb4.conf": No such file or directory error opening config file '/usr/local/etc/smb4.conf'

Возможная причина:

Release Notes for FreeNAS 9.2.1.1-RELEASE
...
A system dataset (.system) is now created in a user-configurable pool, the default being the first pool found. 
This can be changed in System->Settings->Advanced, the .system dataset being created as needed. 
This dataset becamse necessary for storing persistent Samba permissions, and is also being leveraged for other purposes, 
like collecting core files (which otherwise might overflow the limited system partition space) and storing system log files. 
It will be used for additional purposes as FreeNAS evolves.
...

То есть теперь некоторые системные папки будут хранится на одном из созданных Volumes, а при обновлении этот пул выбирается по алгоритму — первый попавшийся

Возможное решение:

Проверьте опцию System Dataset в разделе System, возможно что опция ссылается на том в котором нет свободного места.

При необходимости выберите нужный том и перезапустите FreeNAS.

Ссылка по теме:

FreeNAS releae 9.2.1.1 notes

Just set up FreeNAS 11.2.U7. After installation, I created a group (ShareUsers) and a user (MyUser). I checked the ‘Microsoft Account’ checkbox.

I created a pool MyPool and a dataset MyDataset, for which I set the permissions to Windows, Apply User, MyUser, group ShareUsers.

Then I created an SMB share for /mnt/MyPool/MyDataset, and was asked to start the SMB service (which I did).

From my Windows 7 machine I try to access the share. If I navigate to the IP address of FreeNAS, I can see the share, but when I double click it I always get «access denied». When I try the same from a command prompt (net use w: IPShare), this works, but when I navigate to w: I get access denied again.

I’ve looked at about 10 tutorials online which basically all tell me the same procedure as I’ve done above, and I’ve read countless times how easy setting up a share should be, but still I cannot access the share.

What am I doing wrong here? Thanks for all suggestions!

Edit: I’ve tried allowing guest access, but that doesn’t change a thing.

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Smartsteamloader ошибка 0xc000007b city car driving
  • Smartsteamloader x64 exe системная ошибка