Page 1 of 3

Windows 10 isn't seeing DietPi...

Posted: Sun May 23, 2021 4:17 am
by Nohippychicks
...and I don't know where to change settings or troubleshoot.

I'd like to get back to using DietPi as a NAS, but I'm lost as to where to go.

I can SSH into the Pi as well as ping it from my Windows 10 laptop, but when I attempt to "Map network drive," I can't log onto the Pi like I used to be able to. When I put the folder to "\\192.168.1.134\DietPi\" I get a request for a username and password. When I enter them, I get asked for the password a second time and then the error "The drive could not be mapped because no network was found;" this is even when I check the box to "Connect using different credentials."

Netstat -l shows that port 139 in the Pi is not set to "Listening," and I don't know how to open it up or if that's even the problem.

Where do I go from here?

Re: Windows 10 isn't seeing DietPi...

Posted: Sun May 23, 2021 6:11 am
by Joulinar
Hi,

you have installed samba? And did you checked if the samba services are running?

Re: Windows 10 isn't seeing DietPi...

Posted: Sun May 23, 2021 5:09 pm
by Nohippychicks
Thanks for taking the time to get back with me!

I installed Samba Server through dietpi-software and rebooted. This should start the Samba going, right?

whereis samba produces:

/usr/sbin/samba /usr/lib/arm-linux-gnueabihf/samba /etc/samba /usr/share/samba /usr/share/man/man8/samba.8.gz /usr/share/man/man7/samba.7.gz

I can edit (although have not yet) smb.conf, so it's at least there.

I forgot to mention before that when I try to Telnet into the Pi, Window's CMD window either just produces a blinking cursor on a blank screen for up to 30 minutes before I close it or tells me that it "Cannot open a connection to the host on port XXX: Connect fail."

Re: Windows 10 isn't seeing DietPi...

Posted: Sun May 23, 2021 9:53 pm
by Joulinar
I forgot to mention before that when I try to Telnet into the Pi,
Telnet is not active on DietPi. You would need to use SSH

let's check if samba is running as well

Code: Select all

ss -tulpn | grep LISTEN
systemctl status smbd nmbd
Sometimes Windows is keeping a share connected within the background, blocking a new connection. Let's check following on your Windows box

Code: Select all

net use

Re: Windows 10 isn't seeing DietPi...

Posted: Tue May 25, 2021 2:16 am
by Nohippychicks
Alright, thank you again for your help; I know you guys have better things to do than help strangers out with things they should be able to figure out on their own.

Moving on:

ss -tulpn | grep LISTEN produces

:

Code: Select all

root@DietPi:~# ss -tulpn | grep LISTEN
tcp     LISTEN   0        50               0.0.0.0:445           0.0.0.0:*                                                                                               users:(("smbd",pid=3634,fd=31))
tcp     LISTEN   0        5              127.0.0.1:4711          0.0.0.0:*                                                                                               users:(("pihole-FTL",pid=558,fd=13))
tcp     LISTEN   0        50               0.0.0.0:139           0.0.0.0:*                                                                                               users:(("smbd",pid=3634,fd=32))
tcp     LISTEN   0        1024             0.0.0.0:80            0.0.0.0:*                                                                                               users:(("lighttpd",pid=567,fd=4))
tcp     LISTEN   0        32               0.0.0.0:53            0.0.0.0:*                                                                                               users:(("pihole-FTL",pid=558,fd=5))
tcp     LISTEN   0        128              0.0.0.0:22            0.0.0.0:*                                                                                               users:(("sshd",pid=628,fd=3))
tcp     LISTEN   0        50                  [::]:445              [::]:*                                                                                               users:(("smbd",pid=3634,fd=29))
tcp     LISTEN   0        5                  [::1]:4711             [::]:*                                                                                               users:(("pihole-FTL",pid=558,fd=11))
tcp     LISTEN   0        50                  [::]:139              [::]:*                                                                                               users:(("smbd",pid=3634,fd=30))
tcp     LISTEN   0        1024                [::]:80               [::]:*                                                                                               users:(("lighttpd",pid=567,fd=5)) 

tcp     LISTEN   0        32                  [::]:53               [::]:*                                                                                               users:(("pihole-FTL",pid=558,fd=7))
tcp     LISTEN   0        128                 [::]:22               [::]:*                                                                                               users:(("sshd",pid=628,fd=4))
systemctl

Code: Select all

● smbd.service - Samba SMB Daemon
   Loaded: loaded (/lib/systemd/system/smbd.service; disabled; vendor preset: en
abled)
   Active: active (running) since Sun 2021-05-23 16:03:39 BST; 1 day
9h ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 3633 ExecStartPre=/usr/share/samba/update-apparmor-samba-profile (cod
e=exited, status=0/SUCCESS)
 Main PID: 3634 (smbd)
   Status: "smbd: ready to serve connections..."
    Tasks: 3 (limit: 4915)
   CGroup: /system.slice/smbd.service
           ├─3634 /usr/sbin/smbd --foreground --no-process-group
           ├─3637 /usr/sbin/smbd --foreground --no-process-group
           └─3638 /usr/sbin/smbd --foreground --no-process-group

May 23 16:03:39 DietPi systemd[1]: Starting Samba SMB Daemon...
May 23 16:03:39 DietPi systemd[1]: Started Samba SMB Daemon.
May 23 21:44:14 DietPi smbd[27871]: pam_unix(samba:session): session closed for
user nobody
May 24 22:46:28 DietPi smbd[13293]: pam_unix(samba:session): session closed for
user nobody

● smbd.service - Samba SMB Daemon
   Loaded: loaded (/lib/systemd/system/smbd.service; disabled; vendor preset: en
abled)
   Active: active (running) since Sun 2021-05-23 16:03:39 BST; 1 day
9h ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 3633 ExecStartPre=/usr/share/samba/update-apparmor-samba-profile (cod
e=exited, status=0/SUCCESS)
 Main PID: 3634 (smbd)
   Status: "smbd: ready to serve connections..."
    Tasks: 3 (limit: 4915)
   CGroup: /system.slice/smbd.service
           ├─3634 /usr/sbin/smbd --foreground --no-process-group
           ├─3637 /usr/sbin/smbd --foreground --no-process-group
           └─3638 /usr/sbin/smbd --foreground --no-process-group

May 23 16:03:39 DietPi systemd[1]: Starting Samba SMB Daemon...
May 23 16:03:39 DietPi systemd[1]: Started Samba SMB Daemon.
May 23 21:44:14 DietPi smbd[27871]: pam_unix(samba:session): session closed for
user nobody
May 24 22:46:28 DietPi smbd[13293]: pam_unix(samba:session): session closed for
user nobody
Finally, it looks like Windows is the issue.

Netuse reveals

"System error 1222 has occurred. The network is not present or not started."

I'm going to go do some searching to see what I can find about this and wait for a reply here in the mean time

Re: Windows 10 isn't seeing DietPi...

Posted: Tue May 25, 2021 10:47 am
by Joulinar
I found this very old blog entry. Maybe it's still valid.

http://sgdumb.blogspot.com/2010/08/syst ... s-not.html

Re: Windows 10 isn't seeing DietPi...

Posted: Sat May 29, 2021 4:21 am
by Nohippychicks
Joulinar wrote: Tue May 25, 2021 10:47 am I found this very old blog entry. Maybe it's still valid.
It's different than what I'd found by the time I saw this reply and is leading down a rabbit hole that may take me a while to figure out, but it feels like momentum is building.

Thank you!

Re: Windows 10 isn't seeing DietPi...

Posted: Sat May 29, 2021 10:18 pm
by Joulinar
let us know if you find something on your Windows box :)

Re: Windows 10 isn't seeing DietPi...

Posted: Tue Jun 08, 2021 3:01 am
by Nohippychicks
Well, I don't know if it was the right thing to do, but after banging my head on the wall, I finally got NET USE to indicate "New connections will be remembered. There are no entries in this list."

I did this by enabling SMB 1 in Windows 10 and I'm now back to where I was when I started this thread: I can SSH and ping my Pi but can not find it by trying to map a network drive.

Thanks again for the help!

Re: Windows 10 isn't seeing DietPi...

Posted: Tue Jun 08, 2021 9:39 am
by Joulinar
did you tried to connect from a different device? Like your mobile phone? There are quite some apps who support SMB