samba megosztás

Üdv!

Van egy "nas" azon meg egy samba megosztás.
Viszont valamiért nem látszik a hálózaton. Libreelec-nél az smb-nél nem lehet tallózni ugyanúgy a gnome alatt se látszik.
Az smb.conf végtelenűl egyszerű.
Ha direktbe csatlakozok hozzá a kapcsolat szépen felépül, azaz az smb://server/other listázható írható olvasható ahogy kell.

Mi a bánatot nézek be?

smbtree kiírja a megosztást
pgrep -l mbd nál látszik:
1076 nmbd
1084 smbd
1086 smbd-notifyd

systemctl status-nél ott van, hogy minden ok.

pch

Hozzászólások

sudo netstat -tulpn | egrep "samba|smbd|nmbd|winbind"
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 1084/smbd
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 1084/smbd
tcp6 0 0 :::139 :::* LISTEN 1084/smbd
tcp6 0 0 :::445 :::* LISTEN 1084/smbd
udp 0 0 192.168.1.255:137 0.0.0.0:* 1076/nmbd
udp 0 0 192.168.1.10:137 0.0.0.0:* 1076/nmbd
udp 0 0 0.0.0.0:137 0.0.0.0:* 1076/nmbd
udp 0 0 192.168.1.255:138 0.0.0.0:* 1076/nmbd
udp 0 0 192.168.1.10:138 0.0.0.0:* 1076/nmbd
udp 0 0 0.0.0.0:138 0.0.0.0:* 1076/nmbd

pch
--
http://sb-soft.hu
--

Workgroup neve stimmel a szerveren és a kliensen is ?

--
openSUSE 42.2 x86_64

azt a végtelenül egyszerű smb.conf-ot nem raknád be, hátha látunk is valamit?...

--
"Nem akkor van baj amikor nincs baj, hanem amikor van!"
Népi bölcsesség

smb.conf:
[global]
workgroup = WORKGROUP
server string = szerver

log file = /var/log/samba/%m
max log size = 50

security = user

guest ok = yes

map to guest = Bad User

[Documents]
comment = Documents
path = /mnt/raid0/Documents
browseable = yes
writeable = yes
public = yes

[Music]
comment = Music
path = /mnt/raid0/Music
browsable = yes
writeable = yes
public = yes

[Pictures]
comment = Pictures
path = /mnt/raid0/Pictures
browsable = yes
writeable = yes
public = yes

[Videos]
comment = Videos
path = /mnt/raid0/Videos
browsable = yes
writeable = yes
public = yes

[Other]
comment = Other
path = /mnt/raid0/Other
browsable = yes
writeable = yes
public = yes

pch
--
http://sb-soft.hu
--

Ami még fura:
[pch@pch-szoba ~]$ smbtree
WORKGROUP
\\SZERVER szerver
\\SZERVER\IPC$ IPC Service (szerver)
\\SZERVER\Other Other
\\SZERVER\Videos Videos
\\SZERVER\Pictures Pictures
\\SZERVER\Music Music
\\SZERVER\Documents Documents

Szóval csak a nautilus nem tudja browse-olni meg a libreelec :(
Kezdem nagyon nem érteni mi folyik itt.

pch
--
http://sb-soft.hu
--

local master = yes
os level = 128
preferred master = yes vagy a wins = xxx.xxx.xxx.xxx és egyéb apróságok sem segítenek.?
--
God bless you, Captain Hindsight..

Beírtam de semmi:
okt 18 19:49:37 szerver systemd[1]: Starting Samba SMB/CIFS server...
okt 18 19:49:37 szerver smbd[6370]: [2017/10/18 19:49:37.772580, 0] ../lib/param/loadparm.c:784(lpcfg_map_parameter)
okt 18 19:49:37 szerver smbd[6370]: Unknown parameter encountered: "wins"
okt 18 19:49:37 szerver smbd[6370]: [2017/10/18 19:49:37.772716, 0] ../lib/param/loadparm.c:1811(lpcfg_do_global_parameter)
okt 18 19:49:37 szerver smbd[6370]: Ignoring unknown parameter "wins"
okt 18 19:49:37 szerver systemd[1]: Started Samba SMB/CIFS server.
okt 18 19:49:37 szerver smbd[6372]: [2017/10/18 19:49:37.806250, 0] ../lib/util/become_daemon.c:124(daemon_ready)
okt 18 19:49:37 szerver smbd[6372]: STATUS=daemon 'smbd' finished starting up and ready to serve connections

Sőtt a wins -re aztmondja nem ismeri.

pch
--
http://sb-soft.hu
--

Milyen protokoll smb2 vagy smb1 ?
Pár hónapja jártam így miután letiltottam az SMB1 protokolt a fiam gépén. Onnantól kezdve egyik Linux sem látta.
A megoldás az lett, hogy a kliensek configjába beszúrtam az elejére az alábbi sorokat:
min protocol = SMB2
client min protocol = SMB2
client max protocol = SMB3

Még egy ötlet.
Nincs tűzfal, azaz az ufw-re ez a válasz:
Unit ufw.service could not be found.

Az iptable:
sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Megfoghatja még valami?
Már azon agyalok valami megfogja a portot.

pch
--
http://sb-soft.hu
--

A szobai gépen az sbclient-nél viszont látszik a megosztás.
smbclient -L SZERVER
Enter WORKGROUP\pch's password:

Sharename Type Comment
--------- ---- -------
Documents Disk Documents
Music Disk Music
Pictures Disk Pictures
Videos Disk Videos
Other Disk Other
IPC$ IPC IPC Service (szerver)
Reconnecting with SMB1 for workgroup listing.

Server Comment
--------- -------

Workgroup Master
--------- -------
WORKGROUP SZERVER

készvagyok :(

pch
--
http://sb-soft.hu
--

testparm nem mutat hibát
A kliens gépen lefuttatott smbtree kimenete:


 smbtree -N -d 3
lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[global]"
added interface enp3s0 ip=192.168.1.20 bcast=192.168.1.255 netmask=255.255.255.0
tdb(/var/cache/samba/gencache.tdb): tdb_open_ex: could not open file /var/cache/samba/gencache.tdb: Engedély megtagadva
resolve_lmhosts: Attempting lmhosts lookup for name WORKGROUP<0x1d>
name_resolve_bcast: Attempting broadcast lookup for name WORKGROUP<0x1d>
Got a positive name query response from 192.168.1.10 ( 192.168.1.10 )
Connecting to 192.168.1.10 at port 445
got OID=1.3.6.1.4.1.311.2.2.10
GENSEC backend 'gssapi_spnego' registered
GENSEC backend 'gssapi_krb5' registered
GENSEC backend 'gssapi_krb5_sasl' registered
GENSEC backend 'spnego' registered
GENSEC backend 'schannel' registered
GENSEC backend 'naclrpc_as_system' registered
GENSEC backend 'sasl-EXTERNAL' registered
GENSEC backend 'ntlmssp' registered
GENSEC backend 'ntlmssp_resume_ccache' registered
GENSEC backend 'http_basic' registered
GENSEC backend 'http_ntlm' registered
GENSEC backend 'krb5' registered
GENSEC backend 'fake_gssapi_krb5' registered
Got challenge flags:
Got NTLMSSP neg_flags=0x628a8215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x62008215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x62008215
WORKGROUP
resolve_lmhosts: Attempting lmhosts lookup for name WORKGROUP<0x1d>
name_resolve_bcast: Attempting broadcast lookup for name WORKGROUP<0x1d>
Got a positive name query response from 192.168.1.10 ( 192.168.1.10 )
Connecting to 192.168.1.10 at port 445
got OID=1.3.6.1.4.1.311.2.2.10
Got challenge flags:
Got NTLMSSP neg_flags=0x628a8215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x62008215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x62008215
	\\SZERVER        		szerver
resolve_lmhosts: Attempting lmhosts lookup for name SZERVER<0x20>
resolve_wins: WINS server resolution selected and no WINS servers listed.
resolve_hosts: Attempting host lookup for name SZERVER<0x20>
resolve_hosts: getaddrinfo failed for name SZERVER [A név vagy a szolgáltatás nem ismert]
name_resolve_bcast: Attempting broadcast lookup for name SZERVER<0x20>
Got a positive name query response from 192.168.1.10 ( 192.168.1.10 )
Connecting to 192.168.1.10 at port 445
got OID=1.3.6.1.4.1.311.2.2.10
Got challenge flags:
Got NTLMSSP neg_flags=0x628a8215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x62008215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x62008215
		\\SZERVER\IPC$           	IPC Service (szerver)
		\\SZERVER\Other          	Other
		\\SZERVER\Videos         	Videos
		\\SZERVER\Pictures       	Pictures
		\\SZERVER\Music          	Music
		\\SZERVER\Documents      	Documents

A gyerek(ek) szobájában kévő gépen(gépeken) se lehet tallózni a megosztást.

Közbe már szétbasztam konfigoltam a samba.conf-ot is.


[global]
    workgroup = WORKGROUP
    server string = szerver
    browseable = yes
    writeable = yes
    printable = no
    deadtime = 30
    mangled names = no
    name resolve order = wins host bcast
    printcap name = /dev/null
    load printers = no
    encrypt passwords = true
    enable core files = no
    passdb backend = smbpasswd
    smb encrypt = disabled

    # samba share options
    map to guest = Bad User
    guest account = nobody
    security = user

    # samba tuning options
    socket options = TCP_NODELAY IPTOS_LOWDELAY
    min receivefile size = 16384
    aio read size = 16384
    aio write size = 16384
    use sendfile = yes

    # The following are default values for the master selection process
    local master = yes
    preferred master = True
    domain master = True
    os level = 200

    strict allocate = no

    allocation roundup size = 0

    dns proxy = yes

    interfaces = enp3s0 lo
    bind interfaces only = yes

    
#============================ Share Definitions ==============================


[Documents]
    comment = Documents
    path = /mnt/raid0/Documents
    available = yes
    browseable = yes
    public = yes
    writable = yes

Kliens:
smbtree --version
Version 4.7.0

Szerver:
samba --version
Version 4.7.0

testparm:


Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[Documents]"
Processing section "[Music]"
Processing section "[Pictures]"
Processing section "[Videos]"
Processing section "[Other]"
Loaded services file OK.
Server role: ROLE_STANDALONE

pch
--
http://sb-soft.hu
--

Nekem úgy rémlik a LibreElec már smb3 protokolt használ. Én úgy látom a megosztás az smb1 protokollal van, mert ami látja az ezt írja:
"Reconnecting with SMB1 for workgroup listing"
Nem lehetséges az, hogy az újabb smb cliensek nem keresik az smb1-et ?
Próbáld már ki smb2-vel megosztani.

min protocol = SMB2
client min protocol = SMB2
client max protocol = SMB3

Beírtam, változás:

Szerveren:


smbclient -L localhost
Enter WORKGROUP\pch's password: 

	Sharename       Type      Comment
	---------       ----      -------
	Documents       Disk      Documents
	Music           Disk      Music
	Pictures        Disk      Pictures
	Videos          Disk      Videos
	Other           Disk      Other
	IPC$            IPC       IPC Service (Samba Server 4.7.0)
SMB1 disabled -- no workgroup available

Kliensen:


smbclient -L szerver
Enter WORKGROUP\pch's password: 

	Sharename       Type      Comment
	---------       ----      -------
	Documents       Disk      Documents
	Music           Disk      Music
	Pictures        Disk      Pictures
	Videos          Disk      Videos
	Other           Disk      Other
	IPC$            IPC       IPC Service (Samba Server 4.7.0)
Reconnecting with SMB1 for workgroup listing.
protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE
Failed to connect with SMB1 -- no workgroup available

Az global szekciót is kitakarítottam:


[global]
    workgroup = WORKGROUP
    server string = Samba Server %v
    netbios name = szerver
    security = user
    map to guest = bad user
    dns proxy = no
    min protocol = SMB2
    client min protocol = SMB2
    client max protocol = SMB3

pch
--
http://sb-soft.hu
--

Avahi daemon-t indítva megvannak a megosztások. (zeroconf)
Úgyhogy marad így.

Köszi mindenkinek a segítséget!
pch
--
http://sb-soft.hu
--