FreeNAS-9.2.1.7 настройка\подключение к active directory

Status
Not open for further replies.

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
вот что пишет unable to open new log file '/var/log/samba4/log.smdb': No such file or directory
Я думаю что проблема связана с разрешениями датасета ".system"

Напишите аутпут следующих

'testparm'
'zfs list'
'zfs get aclmode [пул]/.system' например zfs get aclmode tank/.system
'getfacl [пул]/.system'

A файл /usr/local/etc/smb4.conf

А конечно данных сервера (сколько памяти, процессор, ...)

А пожалуйста, используйте теги "code". Голова уже болить из-за ваших сообщении.
 

dimanvl

Dabbler
Joined
Oct 8, 2014
Messages
35
"testparm"
Code:
Load smb config files from /usr/local/etc/smb4.conf                            
max_open_files: increasing sysctl_max (11095) to minimum Windows limit (16384) 
rlimit_max: increasing rlimit_max (11095) to minimum Windows limit (16384)     
Processing section "[BUCKUP]"                                                  
Loaded services file OK.                                                       
Server role: ROLE_STANDALONE                                                   
Press enter to see a dump of your service definitions 


'zfs list'

Code:
zfs list                                                     
NAME                                                USED  AVAIL  REFER  MOUNTPOI
NT                                                                             
Z                                                  10.4M  1.78T   520K  /mnt/Z 
Z/.system                                          9.23M  1.78T   176K  /mnt/Z/.
system                                                                         
Z/.system/cores                                     144K  1.78T   144K  /mnt/Z/.
system/cores                                                                   
Z/.system/rrd-adb946163d914f088dc14617dbc0bec3     2.44M  1.78T  2.44M  /mnt/Z/.
system/rrd-adb946163d914f088dc14617dbc0bec3                                    
Z/.system/samba4                                    408K  1.78T   408K  /mnt/Z/.
system/samba4                                                                  
Z/.system/syslog-adb946163d914f088dc14617dbc0bec3  6.07M  1.78T  6.07M  /mnt/Z/.
system/syslog-adb946163d914f088dc14617dbc0bec3 
 

dimanvl

Dabbler
Joined
Oct 8, 2014
Messages
35
zfs get aclmode [пул]/.system

Code:
        casesensitivity  NO      YES   sensitive | insensitive | mixed                                                             
        checksum        YES      YES   on | off | fletcher2 | fletcher4 | sha256                                                   
        compression     YES      YES   on | off | lzjb | gzip | gzip-[1-9] | zle | lz4                                             
        copies          YES      YES   1 | 2 | 3                                                                                   
        dedup           YES      YES   on | off | verify | sha256[,verify]                                                         
        devices         YES      YES   on | off                                                                                    
        exec            YES      YES   on | off                                                                                    
        jailed          YES      YES   on | off                                                                                    
        logbias         YES      YES   latency | throughput                                                                        
        mlslabel        YES      YES   <sensitivity label>                                                                         
        mountpoint      YES      YES   <path> | legacy | none                                                                      
        nbmand          YES      YES   on | off                                                                                    
        normalization    NO      YES   none | formC | formD | formKC | formKD                                                      
        primarycache    YES      YES   all | none | metadata                                                                       
        quota           YES       NO   <size> | none                                                                               
        readonly        YES      YES   on | off                                                                                    
        recordsize      YES      YES   512 to 128k, power of 2                                                                     
        refquota        YES       NO   <size> | none                                                                               
        refreservation  YES       NO   <size> | none                                                                               
        reservation     YES       NO   <size> | none                                                                               
        secondarycache  YES      YES   all | none | metadata                                                                       
        setuid          YES      YES   on | off                                                                                    
        sharenfs        YES      YES   on | off | share(1M) options                                                                
        sharesmb        YES      YES   on | off | sharemgr(1M) options                                                             
        snapdir         YES      YES   hidden | visible                                                                            
        sync            YES      YES   standard | always | disabled                                                                
        utf8only         NO      YES   on | off                                                                                    
        version         YES       NO   1 | 2 | 3 | 4 | 5 | current                                                                 
        volblocksize     NO      YES   512 to 128k, power of 2                                                                     
        volmode         YES      YES   default | geom | dev | none                                                                 
        volsize         YES       NO   <size>                                                                                      
        vscan           YES      YES   on | off                                                                                    
        xattr           YES      YES   on | off                                                                                    
        userused@...     NO       NO   <size>                                                                                      
        groupused@...    NO       NO   <size>                                                                                      
        userquota@...   YES       NO   <size> | none                                                                               
        groupquota@...  YES       NO   <size> | none                                                                               
        written@<snap>   NO       NO   <size>                                                                                      
                                                                                                                                   
Sizes are specified in bytes with standard units such as K, M, G, etc.                                                             
                                                                                                                                   
User-defined properties can be specified by using a name containing a colon (:).                                                   
                                                                                                                                   
The {user|group}{used|quota}@ properties must be appended with                                                                     
a user or group specifier of one of these forms:                                                                                   
    POSIX name      (eg: "matt")                                                                                                   
    POSIX id        (eg: "126829")                                                                                                 
    SMB name@domain (eg: "matt@sun")                                                                                               
    SMB SID         (eg: "S-1-234-567-89")                                                                                         
[root@freenas ~]#   


getfacl [пул]/.system
Code:
getfacl freenas/.system                                                                                          
getfacl: freenas/.system: stat() failed: No such file or directory                                                                 
[root@freenas ~]# 
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
ваш пул называется "z" а не "freenas" а поэтому запостите:
  • getfacl z/.system
  • /usr/local/etc/smb4.conf
  • ресультат "net ads join -U [администратор] -S [DC] -d5"
 

dimanvl

Dabbler
Joined
Oct 8, 2014
Messages
35
getfacl z/.system

Code:
[root@freenas ~]# getfacl z/.system                                            
getfacl: z/.system: stat() failed: No such file or directory                   
[root@freenas ~]#  
 

dimanvl

Dabbler
Joined
Oct 8, 2014
Messages
35
Code:
doing parameter printcap name = /dev/null                                                                                          
doing parameter disable spoolss = yes                                                                                              
doing parameter getwd cache = yes                                                                                                  
doing parameter guest account = nobody                                                                                             
doing parameter map to guest = Bad User                                                                                            
doing parameter obey pam restrictions = Yes                                                                                        
doing parameter directory name cache size = 0                                                                                      
doing parameter kernel change notify = no                                                                                          
doing parameter panic action = /usr/local/libexec/samba/samba-backtrace                                                            
doing parameter server string = FreeNAS Server                                                                                     
doing parameter ea support = yes                                                                                                   
doing parameter store dos attributes = yes                                                                                         
doing parameter hostname lookups = yes                                                                                             
doing parameter acl allow execute always = true                                                                                    
doing parameter local master = yes                                                                                                 
doing parameter idmap config *:backend = tdb                                                                                       
doing parameter idmap config *:range = 90000000-100000000                                                                          
doing parameter server role = standalone                                                                                           
doing parameter netbios name = FREENAS                                                                                             
doing parameter workgroup = WORKGROUP                                                                                              
doing parameter security = user                                                                                                    
doing parameter pid directory = /var/run/samba                                                                                     
doing parameter smb passwd file = /var/etc/private/smbpasswd                                                                       
doing parameter private dir = /var/etc/private                                                                                     
doing parameter create mask = 0777                                                                                                 
doing parameter directory mask = 0777                                                                                              
doing parameter client ntlmv2 auth = yes                                                                                           
doing parameter dos charset = CP437                                                                                                
doing parameter unix charset = UTF-8                                                                                               
doing parameter log level = 3                                                                                                      
pm_process() returned Yes                                                                                                          
Netbios name list:-                                                                                                                
my_netbios_names[0]="FREENAS"                                                                                                      
added interface lo0 ip=127.0.0.1 bcast=127.255.255.255 netmask=255.0.0.0                                                           
added interface bge0 ip=192.168.0.99 bcast=192.168.0.255 netmask=255.255.255.0                                                     
Registering messaging pointer for type 2 - private_data=0x0                                                                        
Registering messaging pointer for type 9 - private_data=0x0                                                                        
Registered MSG_REQ_POOL_USAGE                                                                                                      
Registering messaging pointer for type 11 - private_data=0x0                                                                       
Registering messaging pointer for type 12 - private_data=0x0                                                                       
Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED                                                                                    
Registering messaging pointer for type 1 - private_data=0x0                                                                        
Registering messaging pointer for type 5 - private_data=0x0                                                                        
Host is not configured as a member server.                                                                                         
Invalid configuration.  Exiting....                                                                                                
Failed to join domain: This operation is only allowed for the PDC of the domain.                                                   
return code = -1                                                                                                                   
Opening cache file at /var/db/samba4/gencache.tdb                                                                                  
Opening cache file at /var/db/samba4/gencache_notrans.tdb                                                                          
[root@freenas ~]# net ads join -U freenas -S central.bankm.ru -d5 
 

dimanvl

Dabbler
Joined
Oct 8, 2014
Messages
35
Вот результат getfacl /mnt/z/.system
Code:
[root@freenas ~]# getfacl /mnt/z/.system                                                                                           
getfacl: /mnt/z/.system: stat() failed: No such file or directory                                                                  
[root@freenas ~]#   
 

dimanvl

Dabbler
Joined
Oct 8, 2014
Messages
35
а вот с этим моментом я не совсем понял - /usr/local/etc/smb4.conf
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
а вот с этим моментом я не совсем понял - /usr/local/etc/smb4.conf
Запостите файл конфигурации "smb4.conf", который находится внутри каталога '/usr/local/etc/'
У меня ещё несколько вопросов.
  • Пользователь "freenas" является администратор домена?
  • Вы можете выполнить пинг полного доменого имени 'central.bankm.ru' от Фринаса?
  • Вы настроили фринас чтобы контроллер домена был DNS-сервер и NTP-сервер его?
  • Они находится на одной подсети?
  • Вы надстроили имя узля на фринас 'freenas.bankm.ru'?
А еще водите:
'getfacl /mnt/Z/.system'
'zfs get aclmode Z/.system' :)
 

dimanvl

Dabbler
Joined
Oct 8, 2014
Messages
35
Ответы на вопросы:
  • пользователь freenas - является администратором доменат.
  • пинг сделал
    Code:
    [root@freenas ~]# ping central.bankm.ru                                                                                            
    PING central.bankm.ru (192.168.0.2): 56 data bytes                                                                                 
    64 bytes from 192.168.0.2: icmp_seq=0 ttl=127 time=0.519 ms                                                                        
    64 bytes from 192.168.0.2: icmp_seq=1 ttl=127 time=0.189 ms                                                                        
    64 bytes from 192.168.0.2: icmp_seq=2 ttl=127 time=0.190 ms                                                                        
    64 bytes from 192.168.0.2: icmp_seq=3 ttl=127 time=0.171 ms                                                                        
    64 bytes from 192.168.0.2: icmp_seq=4 ttl=127 time=0.342 ms                                                                        
    64 bytes from 192.168.0.2: icmp_seq=5 ttl=127 time=0.353 ms                                                                        
    64 bytes from 192.168.0.2: icmp_seq=6 ttl=127 time=0.201 ms                                                                        
    64 bytes from 192.168.0.2: icmp_seq=7 ttl=127 time=0.340 ms                                                                        
    64 bytes from 192.168.0.2: icmp_seq=8 ttl=127 time=0.339 ms                                                                        
    64 bytes from 192.168.0.2: icmp_seq=9 ttl=127 time=0.181 ms                                                                        
    64 bytes from 192.168.0.2: icmp_seq=10 ttl=127 time=0.187 ms                                                                       
    64 bytes from 192.168.0.2: icmp_seq=11 ttl=127 time=0.186 ms                                                                       
    64 bytes from 192.168.0.2: icmp_seq=12 ttl=127 time=0.187 ms                                                                       
    64 bytes from 192.168.0.2: icmp_seq=13 ttl=127 time=0.183 ms                                                                       
    64 bytes from 192.168.0.2: icmp_seq=14 ttl=127 time=0.184 ms                                                                       
    64 bytes from 192.168.0.2: icmp_seq=15 ttl=127 time=0.343 ms                                                                       
    64 bytes from 192.168.0.2: icmp_seq=16 ttl=127 time=0.346 ms                                                                       
    64 bytes from 192.168.0.2: icmp_seq=17 ttl=127 time=0.189 ms                                                                       
    64 bytes from 192.168.0.2: icmp_seq=18 ttl=127 time=0.183 ms                                                                       
    64 bytes from 192.168.0.2: icmp_seq=19 ttl=127 time=0.188 ms                                                                       
    64 bytes from 192.168.0.2: icmp_seq=20 ttl=127 time=0.188 ms                                                                       
    64 bytes from 192.168.0.2: icmp_seq=21 ttl=127 time=0.192 ms                                                                       
    64 bytes from 192.168.0.2: icmp_seq=22 ttl=127 time=0.186 ms                                                                       
    ^C                                                                                                                                 
    --- central.bankm.ru ping statistics ---                                                                                           
    23 packets transmitted, 23 packets received, 0.0% packet loss                                                                      
    round-trip min/avg/max/stddev = 0.171/0.242/0.519/0.091 ms  
  • Вы настроили фринас чтобы контроллер домена был DNS-сервер и NTP-сервер его ( DNS-сервер - настроил контроллер домена, на счет NTP - думаю нет ).
  • Да, они находятся в одной подсети 192.168.0.99 - IP фринаса, 192.168.0.10 - IP контролера домена
  • 0c056e21b145.jpg
  • Code:
    [root@freenas ~]# getfacl /mnt/Z/.system                                                                                           
    # file: /mnt/Z/.system                                                                                                             
    # owner: root                                                                                                                      
    # group: wheel                                                                                                                     
                owner@:rwxp--aARWcCos:------:allow                                                                                     
                group@:r-x---a-R-c--s:------:allow                                                                                     
             everyone@:r-x---a-R-c--s:------:allow                                                                                     
    [root@freenas ~]#   
  • Code:
    [root@freenas ~]# zfs get aclmode Z/.system                                                                                        
    NAME       PROPERTY  VALUE        SOURCE                                                                                           
    Z/.system  aclmode   restricted   inherited from Z                                                                                 
    [root@freenas ~]#   

 

dimanvl

Dabbler
Joined
Oct 8, 2014
Messages
35
Запостите файл конфигурации "smb4.conf", который находится внутри каталога '/usr/local/etc/' - с этим моментом я немного не понял, файл конфигурации нужно вытащить с фринаса ? Он грузится с флешки ( установлен туда ), но как оттуда вытащить это, я немного не понял
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Запостите файл конфигурации "smb4.conf", который находится внутри каталога '/usr/local/etc/' - с этим моментом я немного не понял, файл конфигурации нужно вытащить с фринаса ? Он грузится с флешки ( установлен туда ), но как оттуда вытащить это, я немного не понял
Через консоль, используя клиент-SSH "Putty", напишите "cat /usr/local/etc/smb4.conf". Вы можете просто скопировать текст и вставить здесь между тегами "code".
Кстати, когда вы рекурсивно меняли правы пула "Z", вы тоже меняли правы и настройки набора данных "Z/.system". Для того, чтобы исправить этого, вам надо уничтожить "Z/.system" и перезагрузить сервер.

Code:
zfs destroy Z/.system
 
Last edited:

dimanvl

Dabbler
Joined
Oct 8, 2014
Messages
35
Результат "cat /usr/local/etc/smb4.conf"

Code:
[root@freenas] ~# cat /usr/local/etc/smb4.conf
[global]
    server max protocol = SMB2
    interfaces = 127.0.0.1 192.168.0.99
    bind interfaces only = yes
    encrypt passwords = yes
    dns proxy = no
    strict locking = no
    oplocks = yes
    deadtime = 15
    max log size = 51200
    max open files = 11070
    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
    server string = FreeNAS Server
    ea support = yes
    store dos attributes = yes
    hostname lookups = yes
    acl allow execute always = true
    local master = yes
    idmap config *:backend = tdb
    idmap config *:range = 90000000-100000000
    server role = standalone
    netbios name = FREENAS
    workgroup = WORKGROUP
    security = user
    pid directory = /var/run/samba
    smb passwd file = /var/etc/private/smbpasswd
    private dir = /var/etc/private
    create mask = 0777
    directory mask = 0777
    client ntlmv2 auth = yes
    dos charset = CP437
    unix charset = UTF-8
    log level = 3


[BUCKUP]
    path = /mnt/Z
    printable = no
    veto files = /.snap/.windows/.zfs/
    writeable = yes
    browseable = yes
    recycle:repository = .recycle/%U
    recycle:keeptree = yes
    recycle:versions = yes
    recycle:touch = yes
    recycle:directory_mode = 0777
    recycle:subdir_mode = 0700
    vfs objects = recycle zfsacl streams_xattr aio_pthread
    hide dot files = yes
    hosts allow = 192.168.0.50 , athena
    guest ok = yes
    nfs4:mode = special
    nfs4:acedup = merge
    nfs4:chown = yes
    zfsacl:acesort = dontcare
[root@freenas] ~#
 

dimanvl

Dabbler
Joined
Oct 8, 2014
Messages
35
А это результат - zfs destroy Z/.system

Code:
[root@freenas] ~# zfs destroy Z/.system
cannot destroy 'Z/.system': filesystem has children
use '-r' to destroy the following datasets:
Z/.system/samba4
Z/.system/syslog-adb946163d914f088dc14617dbc0bec3
Z/.system/rrd-adb946163d914f088dc14617dbc0bec3
Z/.system/cores
[root@freenas] ~#
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
А это результат - zfs destroy Z/.system

Code:
[root@freenas] ~# zfs destroy Z/.system
cannot destroy 'Z/.system': filesystem has children
use '-r' to destroy the following datasets:
Z/.system/samba4
Z/.system/syslog-adb946163d914f088dc14617dbc0bec3
Z/.system/rrd-adb946163d914f088dc14617dbc0bec3
Z/.system/cores
[root@freenas] ~#
Я быль на работу и слишком быстро написал команду.
Code:
zfs destroy -fR Z/.system

завтра я прочитаю вашу конфигурацию.
 

dimanvl

Dabbler
Joined
Oct 8, 2014
Messages
35
zfs destroy -fR Z/.system - команда выполнена успешно. сервер перезапущен.
 
Status
Not open for further replies.
Top