[[+content_image]]
D
D
Dganic2013-08-21 18:18:53
linux
Dganic, 2013-08-21 18:18:53

Making Samba 4 work

ArchLinux system, there is a minimum config:

[[email protected] ~]$ cat /etc/samba/smb.conf
[global]
workgroup = WORKGROUP
security = user

[Pomoika]
path = /mnt/p1/
guest ok = yes
read only = No


check the config:
[[email protected] ~]$ testparm -s /etc/samba/smb.conf
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[Pomoika]"
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
        idmap config * : backend = tdb

[Pomoika]
        path = /mnt/p1/
        read only = No
        guest ok = Yes


run:
sudo systemctl start smbd nmbd

check:

[[email protected] ~]$ ps -ef | grep smbd
root      1485     1  0 17:38 ?        00:00:00 /usr/bin/smbd -D
root      1488  1485  0 17:38 ?        00:00:00 /usr/bin/smbd -D
server    1616  1150  0 17:58 pts/0    00:00:00 grep smbd

[[email protected] ~]$ ps -ef | grep nmbd
root      1483     1  0 17:38 ?        00:00:00 /usr/bin/nmbd -D
server    1628  1150  0 17:59 pts/0    00:00:00 grep nmbd</code>

Проверяем Samba:
<source lang="Bash">[[email protected] ~]$ smbclient -L localhost -U%
protocol negotiation failed: NT_STATUS_CONNECTION_DISCONNECTED<


Doesn't work :( Tell me what I'm doing wrong?

Logs:

[[email protected] ~]$ sudo ss -npl | grep .mbd
u_str  LISTEN     0      5      /var/run/samba/nmbd/unexpected 482754                 * 0     users:(("nmbd",8515,28))
u_dgr  UNCONN     0      0                      * 482795                 * 5805  users:(("smbd",8517,29))
tcp    UNCONN     0      0          192.168.0.255:137                   *:*      users:(("nmbd",8515,25))
tcp    UNCONN     0      0            192.168.0.1:137                   *:*      users:(("nmbd",8515,24))
tcp    UNCONN     0      0          192.168.2.255:137                   *:*      users:(("nmbd",8515,21))
tcp    UNCONN     0      0            192.168.2.1:137                   *:*      users:(("nmbd",8515,20))
tcp    UNCONN     0      0           10.14.24.255:137                   *:*      users:(("nmbd",8515,17))
tcp    UNCONN     0      0           10.14.24.244:137                   *:*      users:(("nmbd",8515,16))
tcp    UNCONN     0      0           10.26.23.255:137                   *:*      users:(("nmbd",8515,13))
tcp    UNCONN     0      0            10.26.23.78:137                   *:*      users:(("nmbd",8515,12))
tcp    UNCONN     0      0                      *:137                   *:*      users:(("nmbd",8515,10))
tcp    UNCONN     0      0          192.168.0.255:138                   *:*      users:(("nmbd",8515,27))
tcp    UNCONN     0      0            192.168.0.1:138                   *:*      users:(("nmbd",8515,26))
tcp    UNCONN     0      0          192.168.2.255:138                   *:*      users:(("nmbd",8515,23))
tcp    UNCONN     0      0            192.168.2.1:138                   *:*      users:(("nmbd",8515,22))
tcp    UNCONN     0      0           10.14.24.255:138                   *:*      users:(("nmbd",8515,19))
tcp    UNCONN     0      0           10.14.24.244:138                   *:*      users:(("nmbd",8515,18))
tcp    UNCONN     0      0           10.26.23.255:138                   *:*      users:(("nmbd",8515,15))
tcp    UNCONN     0      0            10.26.23.78:138                   *:*      users:(("nmbd",8515,14))
tcp    UNCONN     0      0                      *:138                   *:*      users:(("nmbd",8515,11))
tcp    LISTEN     0      50                     *:139                   *:*      users:(("smbd",8516,34))
tcp    LISTEN     0      50                     *:445                   *:*      users:(("smbd",8516,33))
tcp    LISTEN     0      50                    :::139                  :::*      users:(("smbd",8516,32))
tcp    LISTEN     0      50                    :::445                  :::*      users:(("smbd",8516,31))



[[email protected] ~]$ ls -l /mnt/
итого 16
drwxrwxrwx  2 root root 4096 мар 14 21:21 MEDIA
drwxrwxrwx 10 root root 4096 авг 11 18:55 mediateka
drwxrwxrwx 14 root root 4096 авг 20 15:53 p1
drwxrwxrwx  3 root root 4096 мар 13 18:38 tmp[/code]

[[email protected] ~]$ sudo cat  /var/log/samba-log.smbd
[2013/08/20 17:03:32.950061,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server /var/run/cups/cups.sock:631 - Нет такого файла или каталога
[2013/08/20 17:03:32.953251,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2013/08/20 17:04:32.827566,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server /var/run/cups/cups.sock:631 - Нет такого файла или каталога
[2013/08/20 17:04:32.831894,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL


more logs:
log.nmbd: paste.ubuntu.com/6006451/

log.smbd: paste.ubuntu.com/6006464/

samba-log__1: paste.ubuntu.com/6006468/

samba-log.smbd: paste.ubuntu.com /6006472/

All logs: yadi.sk/d/q94qDyz787Wpe

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
M
microphone, 2013-08-22
@Dganic

It seems that you can read here:
archlinux.org.ru/forum/topic/1034/?page=1
and here :
bugs.archlinux.org/task/22066
This phrase in the log, starting from here, looks kind of unhealthy "src->results[i].native == -1"
They write about hosts

V
Vladimir Dubrovin, 2013-08-22
@z3apa3a

A bug in samba itself. Or upgrade to a more recent version, or roll back to the top three. Only not 3.6.3 - there is a similar bug.

A
Alexander Galushko, 2016-03-15
@unnforgiven

Here is the process of installing the latest version of samba 4.4 rc from sources, using it as a domain controller (dc), as well as its integration with BIND9_DLZ,DHCP + SQUID3 + ONLYOFFICE ON DOCKER. those. full mince. Also at the end there is an image with a ready server. Take and use. No, thanks))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question