Can't access share with username & password

Jul 18, 2019 178 Replies

Fokke Nauta schrieb am 31.07.2019 um 17:38:

what says

hostname -f

on the pi?

pi@raspberrypi:~ $ hostname -f raspberrypi

Please see the ntpq manual. It is not a replacement to ntpd, but a program to communicate with ntpd.

-TV

It seems to be very much a work in progress: lots of stuff in the man page tagged as not yet implemented and everything command I tried just timed out (Fedora 30 X-64 systems) ntpq 4.2.8, ntpd 4.2.8).

Martin | martin at Gregorie | gregorie dot org

Am 01.08.2019 um 06:40 schrieb Fokke Nauta:

ok - next: make sure smbd and nmbd are running and listening to the right interface

netstat -tapn | grep smbd

netstat -apn | grep nmbd

You should see the ip of the raspberry (192.168.1.2)

if not, your interface does not listen to smb

Did you explain the content of your user mapping file? please cat /home/pi/samba/usermap.txt

we have already established that nothing is wrong on the linux side: its only windows 10 that has issues.

It seems to require a different protoical and/or password system

Its probably this

formatting link

Windows ten will not see or mnount SMB V1 servers.

No Apple devices were knowingly used in the preparation of this post.

pi@raspberrypi:~ $ netstat -tapn | grep smbd (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.)

pi@raspberrypi:~ $ sudo netstat -tapn | grep smbd tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 11978/smbd tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 11978/smbd tcp6 0 0 :::445 :::* LISTEN 11978/smbd tcp6 0 0 :::139 :::* LISTEN 11978/smbd

Does this mean anything to you?

pi@raspberrypi:~ $ sudo netstat -apn | grep nmbd udp 0 0 192.168.1.255:137 0.0.0.0:* 11947/nmbd udp 0 0 192.168.1.2:137 0.0.0.0:* 11947/nmbd udp 0 0 0.0.0.0:137 0.0.0.0:* 11947/nmbd udp 0 0 192.168.1.255:138 0.0.0.0:* 11947/nmbd udp 0 0 192.168.1.2:138 0.0.0.0:* 11947/nmbd udp 0 0 0.0.0.0:138 0.0.0.0:* 11947/nmbd unix 2 [ ] DGRAM 534571 11947/nmbd /var/lib/samba/private/msg.sock/11947 unix 2 [ ACC ] STREAM LISTENING 534589 11947/nmbd /var/run/samba/nmbd/unexpected

The IP address is visable.

pi@raspberrypi:~ $ cat /home/pi/samba/usermap.txt pi = "Fokke Nauta"

>

Am 01.08.2019 um 16:43 schrieb Fokke Nauta:

the first two lines say that your machine listens on port 445 and 139 (new and old samba over tcpip ports) on ALL interfaces that it founds (0.0.0.0 is for all interfaces not for a specific one.)

the name server service for samba/cifs requests is bound to various ports on different ip addresses. x.255 is the broadcast, .1.2 is your raspberry and 0.0.0.0 is for all internet adresses/interfaces.

that means that your user "Fokke Nauta" on your windows machine matches the user pi on your raspberry. Make sure your windows password is the same that you set with password pi on your raspberry.

I dont know at the moment why and how your smbpasswd reacts in this situation... maybe never if you want to connect with your username "Fokke Nauta" from Windows to your raspberry.

Maybe this helps to connect to

net use X: \\raspberry\pishare /user:"Fokke Nauta" password

but strange that you cant get the shares by typing

net view raspberry or net view \\raspberry or net view \\192.168.1.2

[C:\Program Files\JPSoft\TCCLE14x64]net use s: \\raspberrypi\pishare /user:"Fokke Nauta" The password or user name is invalid for \\raspberrypi\pishare.

Enter the password for 'Fokke Nauta' to connect to 'raspberrypi': System error 1326 has occurred.

The user name or password is incorrect.

[C:\Program Files\JPSoft\TCCLE14x64]net view \\raspberrypi System error 53 has occurred.

The network path was not found.

[C:\Program Files\JPSoft\TCCLE14x64]net view \\192.168.1.2 System error 53 has occurred.

The network path was not found.

What is really weird, is that I see the pi in my network (This pc - Network). It is there between the other pc's, but it remains unaccessable.

Never thought it would be so difficult to create a share in the pi. To be honest, I'm about to give up ...

It works for me well, e.g. Raspbian Buster:

--- clip clip ---

tauno@raspberrypi:~ $ ntpq ntpq> rv associd=0 status=0615 leap_none, sync_ntp, 1 event, clock_sync, version="ntpd 4.2.8p12@1.3728-o (1)", processor="armv6l", system="Linux/4.19.57+", leap=00, stratum=4, precision=-18, rootdelay=9.594, rootdisp=72.311, refid=192.89.123.26, reftime=e0ed8320.90ce5300 Thu, Aug 1 2019 18:26:24.565, clock=e0ed893d.80bb5410 Thu, Aug 1 2019 18:52:29.502, peer=48597, tc=10, mintc=3, offset=0.077807, frequency=-31.036, sys_jitter=1.253593, clk_jitter=0.169, clk_wander=0.006 ntpq> q tauno@raspberrypi:~ $ exit

--- clip clip ---

You asked how to poll the state of NTP, and ntpq is a tool from the original developer of NTP, Prof David L. Mills, see .

-TV

I meant something like "systemctl status ntpd" rather than ntpq,

But there's something odd, in the Fedora install anyway: I'm seeing this:

$ ntpq ntpq> as ind assid status conf reach auth condition last_event cnt =========================================================== 1 62962 8013 yes no none reject unreachable 1 2 62963 8011 yes no none reject mobilize 1 3 62964 8011 yes no none reject mobilize 1 4 62965 961a yes yes none sys.peer sys_peer 1 5 62966 9414 yes yes none candidate reachable 1 ntpq> q

$ ntpq ntpq> host localhost current host set to localhost ntpq> as ind assid status conf reach auth condition last_event cnt =========================================================== 1 62962 8013 yes no none reject unreachable 1 2 62963 8011 yes no none reject mobilize 1 3 62964 8011 yes no none reject mobilize 1 4 62965 961a yes yes none sys.peer sys_peer 1 5 62966 9414 yes yes none candidate reachable 1 ntpq> q

$ ntpq ntpq> host zappa current host set to zappa.gregorie.lan ntpq> as zappa.gregorie.lan: timed out, nothing received

***Request timed out ntpq> q ... where zappa.gregorie.lan physically the same hardware & software as localhost

Here's the behaviour I'm seeing:

1) setting 'host' to an undefined host name (gets "Name or service not known" error)

2) setting it to a valid host name which is not running ntpd (gets "read: Connection refused" if you try to query it)

3) setting it to a valid host name with ntpd running (gets "***Request timed out" if you try to query it

4) setting it to 'localhost' (queries work OK).

It doesn't seem to matter whether case 3 is the same system as in case 4, so there's evidently something amiss on the 'host' command, at least with version ntpq 4.2.8p13@1.3847-o Thu Mar 7 14:37:11 UTC 2019 (1)

Martin | martin at Gregorie | gregorie dot org

NOTE: the preceeding post is likely to get mangled if you're letting your newsreader rewrap it, i.e. reformat paragraphs.

PAN will make an unreadable mess of the post unless you've turned "Wrap article body" OFF - its in the View|Body pane.

Guess how I know this.

Martin | martin at Gregorie | gregorie dot org

Martin Gregorie writes: [...]

I expect that it is a different IP address.

You have a ?restrict? lines in /etc/ntp.conf permitting localhost to query your ntpd but not other addresses.

https://www.greenend.org.uk/rjk/

Several, actually. However, according to its CVS log the only changes I've made to /etc/ntp.conf, apart from periodic edits to keep up with new ntpd versions, was to change the default server pool list.

After a bit of head-scratching I worked how to read the "restrict default" line and now understand why keyid doesn't work (no keys defined in /etc/ntp/keys) so now I sort of understand what's going on.

Thanks.

Martin | martin at Gregorie | gregorie dot org

On 01/08/2019 19:51, Richard Kettlewell wrote: []

If it helps, here's what I use:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Suggestions for NTP restrictions (accepting ntpq commands from the LAN): restrict source notrap nomodify nopeer restrict 127.0.0.1 restrict ::1 restrict 192.168.0.0 mask 255.255.255.0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Cheers, David Web: http://www.satsignal.eu

Am 01.08.2019 um 17:56 schrieb Fokke Nauta:

So for a last chance, please comment in your smb.conf this line

#usershare map ...

and try in Windows command shell

dir \\raspberry\pishare

Maybe for name resolution you can insert in your hosts file on the windows machine this line and save it (edit with admin rights)

192.168.1.2 raspberry

On Thu, 1 Aug 2019 18:20:48 +0000 (UTC), Martin Gregorie declaimed the following:

Might be something in the firewall settings?

Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

There was no line such as usershare map. And Windows sees the pi. In This PC - Networking, I can see all the pc's in the LAN, including the pi. It's clearly there! But it's not accessible. I can't log in.

I give up. I'll try to hire a Linux expert to achieve this.

Thanks very much for your help, it is highly appreciated. It's a pity I can't get it to work. But I haven't got a clue as to why it won't work. I used to work in the ICT and have a lot of experience with Windows systems. However, not with Linux. Learned a lot, lately.

Regards, Fokke

THAT makes sense, at least for my Fedora systems, but my RPi doesn't currently run a firewall, but does exactly the same, so its probably the ntp 'restrict' lines that are blocking cross-LAN access.

However, its not a problem now I unnerstan what be gwine on: I've never needed to see the sort of stuff ntpq can show in the past and don't expect to need it in the future.

Martin | martin at Gregorie | gregorie dot org

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required