Sharing via SAMBA problems-Spanish

Buenas tardes

Primero de todo decir que aprovecho para presentrme ya que soy completamente nuevo en el foro y en los temas que se comentan aqui.
Tambien deciros que aunque estoy muy interesado en aprender no soy especialmente habilidoso. Asi que despues de estar literalmente una semana leyendo por todas partes e intentando cosas con el firmware del router, me he decidido a preguntaros ya que no soy capaz de resolver este asunto, que visto el nivel que tiene el foro seguro que pensareis que es una minucia.

Me he comprado el router GL-AR750S. He conseguido instalar el openwrt, cosa no muy dificil ya que venia practicamente preinstalado. He podido configurar OpenVPN con y sin un proveedor de VPN. Me puedo conectar al terminal con putty.

La siguiente cosa que queria hacer es usar un disco duro conectado al puerto USB del router como unidad multimedia para la casa.
Siguiendo las instrucciones que he encontrado, he instalado un monton de paquetes y he conseguido montar el disco duro, creo que correctamente ya que puedo acceder al contenido del disco duro via ssh:
Esto es lo que aparece en Luci en Mounted file systems

/dev/sda1/mnt/sda1 5.09 GB / 465.76 GB 99% (460.67 GB)

Sin embargo ni el router, ni el disco duro, me aparecen en los diferentes file explorers que he probado en red local. Ni en windows ni en ipads/iphones etc.
He leido que habria que configurar el archivo de config de samba, lo he intentado a traves de luci en la pestaña de network shares, edit template, he escrito lo siguiente (copiado de una pagina web>):

config 'sambashare'
option 'name' 'Shares'
option 'path' '/mnt/sda1'
option 'users' 'root'
option 'guest_ok' 'yes'
option 'create_mask' '0700'
option 'dir_mask' '0700'

Sin embargo no hay manera el router sigue sin aparecer en ningun file explorer.
He intentado mapear el drive ia la dirreccion ip del router pero no hay manera no entra o no lo reconoce.
Tambien he intentado conectarme via VLC , pero sin exito.

La verdad que ni idea. Pero me gusta que haya alguien que hable Español :smiley:.

Please always provide an english translation, so other users all around the world can take part in the discussion and possibly benefit from the outcome.

What packages did you install? Did you enable the samba service? Is it active and listening?

---English---
Hi @cbx200

It seems that the configuration of your mount point that you are configuring in samba option 'path' '/mnt/sda1' is not the correct one, in luci it appears as your mount point of your disk /dev/sda1/mnt/sda1 so your samba configuration should be option 'path' '/dev/sda1/mnt/sda1'

However, I would recommend that you better configure the samba parameters from luci, it has always been difficult for me to configure samba directly in the configuration files

To restart the samba configuration from scratch, restore the original configuration. In ssh run

cp /etc/samba/smb.conf.template /etc/samba/smb.conf

Restart samba service

/etc/init.d/samba restart

On luci, configure your usb share

(See bottom image)

In "Name" write the name you want for the network shared folder will have
In "Path->;" change for the mount point that shows in luci, in your case it would be /dev/sda1/mnt/sda1
Save and apply your settings, if necessary, restart the samba service on your device and your shared folder should work.

All this is based and assuming, as you mention, that you can see the contents of your disk from your router

Hope it helps

---Spanish/Español---
Saludos @cbx200

Parece que la configuracion de tu punto de montaje que estás configurando en samba option 'path' '/mnt/sda1' no es la correcta, en luci te aparece como tu punto de montaje de tu disco /dev/sda1/mnt/sda1 asi que tu configuracion de samba deberia ser option 'path' '/dev/sda1/mnt/sda1'

Sin embargo, te recomendaria que mejor configuraras los parametros de samba desde luci, siempre se me ha complicado configurar samba directo en los archvos de configuracion

Para volver a empesar desde cero la configracion de samba, restaura la configuracion original. En ssh ejecuta

cp /etc/samba/smb.conf.template /etc/samba/smb.conf

Reinicia el servicio de samba

/etc/init.d/samba restart

En luci configura tu unidad
Pantallazo-2018-11-14%2009-22-36
En "Name" cambia por el nombre que quieres que tenga la carpeta compartida en red
En "Path->" cambia por la ruta que te muentra luci como punto de montaje de tu unidad, en tu caso sería /dev/sda1/mnt/sda1
Guardas y aplicas tu configuracion, de ser necesario reinicias el servicio de samba en tu dispositivo y deberia de funcionar ya tu carpeta compartida.

Todo esto es en base y suponiendo, como nos comentas, que ya puedes ver el contenido de tu disco desde tu router

Espero que te sirva de ayuda y que bueno es ver más gente hablando español

I think there is a missing space in OP's post, "/dev/sda1" is the device, and "/mnt/sda1" is the mount point.

Oh, I see :thinking: thanks for point it @eduperez
In that case, should work starting from scratch again, and in luci on network shares "Path->" write "/mnt/sda1"

Thanks Eduardo

I installed a long list of packages provided in a internet guide

Samba es enabled via luci interface

How can i check whether it is listening?

Gracias Eduardo and Mynzer

So what I had written in the luci template to configure samba was right?

Or should I change it?

Saludos

Execute "ps" and look for a process called "smbd" and another called "nmbd"; execute "netstat -an" and look for a LISTEN connection on port 139.

Hi Edu

I have executed ps and found the following

usr/sbin/nmbd -F

But I don’t find anything with smbd

I had restarted samba but I can’t see any process with smbd

What can I do?

Thanks and regards

Port 139 is not listening

This is the result for ps

root@GL-AR750S:~# ps
  PID USER       VSZ STAT COMMAND
    1 root      1552 S    /sbin/procd
    2 root         0 SW   [kthreadd]
    3 root         0 SW   [ksoftirqd/0]
    4 root         0 SW   [kworker/0:0]
    5 root         0 SW<  [kworker/0:0H]
    6 root         0 SW   [kworker/u2:0]
    7 root         0 SW<  [lru-add-drain]
    8 root         0 SW   [kworker/u2:1]
   12 root         0 SW   [kworker/u2:2]
   30 root         0 SW   [oom_reaper]
   80 root         0 SW<  [writeback]
   82 root         0 SW<  [crypto]
   83 root         0 SW<  [bioset]
   85 root         0 SW<  [kblockd]
  103 root         0 SW<  [watchdogd]
  116 root         0 SW   [kworker/0:1]
  123 root         0 SW   [kswapd0]
  187 root         0 SW   [spi0]
  223 root         0 SW<  [bioset]
  228 root         0 SW<  [bioset]
  233 root         0 SW<  [bioset]
  238 root         0 SW<  [bioset]
  243 root         0 SW<  [bioset]
  250 root         0 SW<  [bioset]
  307 root         0 SW<  [ipv6_addrconf]
  320 root         0 SW   [ubi_bgt0d]
  321 root         0 SW<  [bioset]
  326 root         0 SW<  [kworker/0:1H]
  386 root         0 SW   [kworker/0:2]
  387 root         0 SW   [kworker/0:3]
  389 root         0 SW   [scsi_eh_0]
  391 root         0 SW<  [scsi_tmf_0]
  392 root         0 SW   [usb-storage]
  407 root         0 SW   [scsi_eh_1]
  408 root         0 SW<  [scsi_tmf_1]
  409 root         0 SW   [usb-storage]
  412 root         0 SW<  [bioset]
  434 root         0 SW<  [bioset]
  439 root         0 SW   [kworker/u2:3]
  442 root         0 SW   [kworker/u2:4]
  460 root         0 SW   [ubifs_bgt0_1]
  554 root      1196 S    /sbin/ubusd
  556 root       900 S    /sbin/askfirst /bin/ash --login
  903 root         0 SW<  [cfg80211]
  958 root         0 SW<  [ath10k_wq]
  959 root         0 SW<  [ath10k_aux_wq]
 1514 root      1224 S    /sbin/logd -S 64
 1531 root      1524 S    /sbin/rpcd
 1696 root      1720 S    /sbin/netifd
 1754 root      1420 S    /usr/sbin/odhcpd
 1762 root      1256 S    /bin/sh /usr/bin/sta-watch
 1849 root      1064 S    /usr/sbin/dropbear -F -P /var/run/dropbear.1.pid -p 22 -K 300 -T 3
 1952 root      2464 S    /usr/sbin/nmbd -F
 2052 root      1212 S    udhcpc -p /var/run/udhcpc-eth0.2.pid -s /lib/netifd/dhcp.script -f -t 0 -i eth0.2 -x hostname:GL-AR750S-6d0 -C -O 121
 2062 root      1028 S    odhcp6c -s /lib/netifd/dhcpv6.script -P0 -t120 eth0.2
 2093 root      4004 S    /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
 2097 root      4268 S    /www/api
 2098 root      2144 S    /www/html
 2236 root         0 SW   [kworker/0:4]
 2370 dnsmasq   1316 S    /usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf.cfg01411c -k -x /var/run/dnsmasq/dnsmasq.cfg01411c.pid
 2427 root       968 S    /usr/sbin/vsftpd
 2590 root      2000 S    /usr/sbin/hostapd -s -P /var/run/wifi-phy1.pid -B /var/run/hostapd-phy1.conf
 2753 root      2000 S    /usr/sbin/hostapd -s -P /var/run/wifi-phy0.pid -B /var/run/hostapd-phy0.conf
 2773 root      1932 S    /usr/sbin/wpa_supplicant -B -P /var/run/wpa_supplicant-wlan-sta.pid -D nl80211 -i wlan-sta -c /var/run/wpa_supplicant-wl
 2890 root      1212 S    udhcpc -p /var/run/udhcpc-wlan-sta.pid -s /lib/netifd/dhcp.script -f -t 0 -i wlan-sta -x hostname:GL-AR750S -C -O 121
 2924 root      1948 S    /usr/bin/gl_health
 2982 root       976 S    /usr/bin/gl_mem_monitor
 2985 root      1212 S    ash /usr/bin/qmi_watch.sh
 3223 root      1216 S<   /usr/sbin/ntpd -n -N -l -S /usr/sbin/ntpd-hotplug -p 0.openwrt.pool.ntp.org -p 1.openwrt.pool.ntp.org -p 2.openwrt.pool.
 3264 root      1300 S    /bin/sh /usr/sbin/mwan3track wwan wlan-sta online 192.168.178.39 8.8.4.4 8.8.8.8 208.67.222.222 208.67.220.220
 4722 root      1132 S    /usr/sbin/dropbear -F -P /var/run/dropbear.1.pid -p 22 -K 300 -T 3
 4774 root      1212 S    sleep 5
 4775 root      1216 S    -ash
 4805 root      1212 S    sleep 5
 4817 root      1212 S    sleep 3
 4823 root      1212 R    ps
root@GL-AR750S:~#

I have rebooted the router and samba

Result for netstat -an

root@GL-AR750S:~# netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      
tcp        0      0 0.0.0.0:83              0.0.0.0:*               LISTEN      
tcp        0      0 192.168.178.39:53       0.0.0.0:*               LISTEN      
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      
tcp        0      0 192.168.8.1:53          0.0.0.0:*               LISTEN      
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      
tcp        0    576 192.168.178.39:22       192.168.8.118:53288     ESTABLISHED 
tcp        0      0 fe80::e495:6eff:fe45:96d0:53 :::*                    LISTEN      
tcp        0      0 fe80::e695:6eff:fe45:96d0:53 :::*                    LISTEN      
tcp        0      0 fe80::e695:6eff:fe45:96d1:53 :::*                    LISTEN      
tcp        0      0 ::1:53                  :::*                    LISTEN      
tcp        0      0 fe80::e695:6eff:fe45:96d0:53 :::*                    LISTEN      
tcp        0      0 fd19:7574:c74f::1:53    :::*                    LISTEN      
tcp        0      0 fe80::e695:6eff:fe45:96d0:53 :::*                    LISTEN      
tcp        0      0 fe80::e695:6eff:fe45:96d0:53 :::*                    LISTEN      
tcp        0      0 :::22                   :::*                    LISTEN      
udp        0      0 192.168.178.39:53       0.0.0.0:*                           
udp        0      0 127.0.0.1:53            0.0.0.0:*                           
udp        0      0 192.168.8.1:53          0.0.0.0:*                           
udp        0      0 0.0.0.0:67              0.0.0.0:*                           
udp        0      0 192.168.8.255:137       0.0.0.0:*                           
udp        0      0 192.168.8.1:137         0.0.0.0:*                           
udp        0      0 192.168.178.255:137     0.0.0.0:*                           
udp        0      0 192.168.178.39:137      0.0.0.0:*                           
udp        0      0 0.0.0.0:137             0.0.0.0:*                           
udp        0      0 192.168.8.255:138       0.0.0.0:*                           
udp        0      0 192.168.8.1:138         0.0.0.0:*                           
udp        0      0 192.168.178.255:138     0.0.0.0:*                           
udp        0      0 192.168.178.39:138      0.0.0.0:*                           
udp        0      0 0.0.0.0:138             0.0.0.0:*                           
udp        0      0 :::546                  :::*                                
udp        0      0 :::547                  :::*                                
udp        0      0 fe80::e495:6eff:fe45:96d0:53 :::*                                
udp        0      0 fe80::e695:6eff:fe45:96d0:53 :::*                                
udp        0      0 fe80::e695:6eff:fe45:96d1:53 :::*                                
udp        0      0 ::1:53                  :::*                                
udp        0      0 fe80::e695:6eff:fe45:96d0:53 :::*                                
udp        0      0 fd19:7574:c74f::1:53    :::*                                
udp        0      0 fe80::e695:6eff:fe45:96d0:53 :::*                                
udp        0      0 fe80::e695:6eff:fe45:96d0:53 :::*                                
udp        0      0 :::123                  :::*                                
raw        0      0 ::%1:58                 ::%4457820:*            58          
raw        0      0 ::%1:58                 ::%4457820:*            58          
raw        0      0 ::%1:58                 ::%4457820:*            58          
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node Path
unix  11     [ ]         DGRAM                      2091 /dev/log
unix  2      [ ACC ]     STREAM     LISTENING       3138 /tmp/api.socket-0
unix  2      [ ACC ]     STREAM     LISTENING       3143 /tmp/html.socket-0
unix  2      [ ACC ]     STREAM     LISTENING        403 /var/run/ubus.sock
unix  2      [ ACC ]     STREAM     LISTENING      15036 /var/nmbd/unexpected
unix  2      [ ]         DGRAM                      4293 /tmp/wpa_ctrl_2666-1
unix  3      [ ]         DGRAM                      3784 /var/run/hostapd/wlan1
unix  2      [ ]         DGRAM                      4316 /var/run/wpa_supplicant/wlan-sta
unix  2      [ ]         DGRAM                      4084 /var/run/hostapd/wlan0
unix  3      [ ]         STREAM     CONNECTED       3787 
unix  3      [ ]         STREAM     CONNECTED       5834 
unix  2      [ ]         DGRAM                      3643 
unix  2      [ ]         DGRAM                      2556 
unix  2      [ ]         DGRAM                      5832 
unix  3      [ ]         STREAM     CONNECTED        412 /var/run/ubus.sock
unix  3      [ ]         STREAM     CONNECTED       2654 /var/run/ubus.sock
unix  3      [ ]         STREAM     CONNECTED       3788 /var/run/ubus.sock
unix  3      [ ]         STREAM     CONNECTED       2093 
unix  3      [ ]         STREAM     CONNECTED       3715 
unix  2      [ ]         DGRAM                      3154 
unix  2      [ ]         DGRAM                     13975 
unix  3      [ ]         STREAM     CONNECTED       5835 /var/run/ubus.sock
unix  3      [ ]         STREAM     CONNECTED       2558 
unix  2      [ ]         DGRAM                      2797 
unix  3      [ ]         STREAM     CONNECTED       2094 /var/run/ubus.sock
unix  3      [ ]         STREAM     CONNECTED       2106 /var/run/ubus.sock
unix  3      [ ]         STREAM     CONNECTED       3716 /var/run/ubus.sock
unix  3      [ ]         STREAM     CONNECTED       2653 
unix  2      [ ]         DGRAM                      1181 
unix  3      [ ]         STREAM     CONNECTED       4144 /var/run/ubus.sock
unix  2      [ ]         DGRAM                      3662 
unix  3      [ ]         STREAM     CONNECTED       2105 
unix  2      [ ]         DGRAM                      3693 
unix  3      [ ]         STREAM     CONNECTED        407 
unix  3      [ ]         STREAM     CONNECTED       2559 /var/run/ubus.sock
unix  2      [ ]         DGRAM                       410 
unix  3      [ ]         STREAM     CONNECTED       4143 
unix  2      [ ]         DGRAM                      2813 
root@GL-AR750S:~#

Have a look to the logs, restart the daemon then execute "logread". Also, there should be a couple of "log.something" files at "/var/log".

Hi Edu

I have executed ps and found the following

usr/sbin/nmbd -F

But I don’t find anything with smbd

I had restarted samba but I can’t see any process with smbd

What can I do?

Thanks and regards

I dont remember what version of smb is installed on lede but regardless nowadays you shouldnt trust on not seeing any new computer on the network IMHO, instead you should try to manually add a network share with the full path to the share, in this case i think it should be

\\ipoftherouter\Shares

if on windows...

O en español:
No deberías confiar en no ver nuevas computadoras en la red, dependiendo de la versión de samba no te aparece nada, deberías agregar la unidad compartida manualmente en mi opinión y hacer pruebas desde ahí...

Edu
I have executed log read but I can’t see anything related to samba.
The results are too long to paste here

Indeed there is a log.smbd and lod.nmbd
But I don’t know how to read the contents from within the terminal