doubleudee1
Posts: 158
Joined: Fri Nov 30, 2018 2:39 pm
Location: Wales

Re: ARRRRGGGHHHH Its happened again! - Lost Samba settings

Sun Sep 15, 2019 1:00 pm

yes, did that at an earlier stage, used the same pwd as my pi logon for my initial logon to pi.
Make the most of your family and friends , your children grow up too quickly and you don't notice yourself ageing, friends dissapearing, moving on. You make plans for your future, but they can all be smashed in an instant, live life and enjoy. :)

doubleudee1
Posts: 158
Joined: Fri Nov 30, 2018 2:39 pm
Location: Wales

Re: ARRRRGGGHHHH Its happened again! - Lost Samba settings

Sun Sep 15, 2019 1:03 pm

Do you have to do that straight after loading Samba? If so, that's where I slipped up as I loaded a couple of other things onto my pi before I did that.
Make the most of your family and friends , your children grow up too quickly and you don't notice yourself ageing, friends dissapearing, moving on. You make plans for your future, but they can all be smashed in an instant, live life and enjoy. :)

hortimech
Posts: 323
Joined: Wed Apr 08, 2015 5:52 pm

Re: ARRRRGGGHHHH Its happened again! - Lost Samba settings

Sun Sep 15, 2019 5:26 pm

doubleudee1 wrote:
Sun Sep 15, 2019 10:05 am
Now getting:-

smbclient -L localhost -N

Unable to initialize messaging context
Anonymous login successful
tree connect failed: NT_STATUS_ACCESS_DENIED

???????????
Strange, on my rpi I get:

Code: Select all

Unable to initialize messaging context
Anonymous login successful

	Sharename       Type      Comment
	---------       ----      -------
	testshare       Disk      test share
	IPC$            IPC       IPC Service (Samba 4 Client raspberrypi)
SMB1 disabled -- no workgroup available
Who are you running Samba as ?

doubleudee1
Posts: 158
Joined: Fri Nov 30, 2018 2:39 pm
Location: Wales

Re: ARRRRGGGHHHH Its happened again! - Lost Samba settings

Mon Sep 16, 2019 5:11 am

I'm beginning to wonder whether this is something to do with windows 10 deprecating Workgroups?
Make the most of your family and friends , your children grow up too quickly and you don't notice yourself ageing, friends dissapearing, moving on. You make plans for your future, but they can all be smashed in an instant, live life and enjoy. :)

doubleudee1
Posts: 158
Joined: Fri Nov 30, 2018 2:39 pm
Location: Wales

Re: ARRRRGGGHHHH Its happened again! - Lost Samba settings

Mon Sep 16, 2019 8:14 am

hortimech wrote:
Sun Sep 15, 2019 5:26 pm
doubleudee1 wrote:
Sun Sep 15, 2019 10:05 am
Now getting:-

smbclient -L localhost -N

Unable to initialize messaging context
Anonymous login successful
tree connect failed: NT_STATUS_ACCESS_DENIED

???????????
Strange, on my rpi I get:

Code: Select all

Unable to initialize messaging context
Anonymous login successful

	Sharename       Type      Comment
	---------       ----      -------
	testshare       Disk      test share
	IPC$            IPC       IPC Service (Samba 4 Client raspberrypi)
SMB1 disabled -- no workgroup available
Who are you running Samba as ?
I am running samba as pi, using the same logon details as per my RPI, but now my logon is failing
Make the most of your family and friends , your children grow up too quickly and you don't notice yourself ageing, friends dissapearing, moving on. You make plans for your future, but they can all be smashed in an instant, live life and enjoy. :)

doubleudee1
Posts: 158
Joined: Fri Nov 30, 2018 2:39 pm
Location: Wales

Re: ARRRRGGGHHHH Its happened again! - Lost Samba settings

Mon Sep 16, 2019 8:22 am

Here's my setup

Image
Attachments
InkedCapture3_LI.jpg
InkedCapture3_LI.jpg (78.97 KiB) Viewed 277 times
Last edited by doubleudee1 on Mon Sep 16, 2019 8:36 am, edited 2 times in total.
Make the most of your family and friends , your children grow up too quickly and you don't notice yourself ageing, friends dissapearing, moving on. You make plans for your future, but they can all be smashed in an instant, live life and enjoy. :)

hortimech
Posts: 323
Joined: Wed Apr 08, 2015 5:52 pm

Re: ARRRRGGGHHHH Its happened again! - Lost Samba settings

Mon Sep 16, 2019 8:22 am

doubleudee1 wrote:
Mon Sep 16, 2019 5:11 am
I'm beginning to wonder whether this is something to do with windows 10 deprecating Workgroups?
When did they do that ?

I have these lines in smb.conf:

Code: Select all

    client min protocol = SMB2_02
    server min protocol = SMB2_02
I run wsdd.py from here: https://github.com/christgau/wsdd

Everything works :)

if you run this:

Code: Select all

ps ax | grep '[s]mbd'
Do you get any output ?

doubleudee1
Posts: 158
Joined: Fri Nov 30, 2018 2:39 pm
Location: Wales

Re: ARRRRGGGHHHH Its happened again! - Lost Samba settings

Mon Sep 16, 2019 8:38 am

hortimech wrote:
Mon Sep 16, 2019 8:22 am
doubleudee1 wrote:
Mon Sep 16, 2019 5:11 am
I'm beginning to wonder whether this is something to do with windows 10 deprecating Workgroups?
When did they do that ?

I have these lines in smb.conf:

Code: Select all

    client min protocol = SMB2_02
    server min protocol = SMB2_02
I run wsdd.py from here: https://github.com/christgau/wsdd

Everything works :)

if you run this:

Code: Select all

ps ax | grep '[s]mbd'
Do you get any output ?
Yes:-

pi@raspberrypi:~ $ ps ax | grep 'mbd'
933 ? Ss 0:00 /usr/sbin/smbd --foreground --no-process-group
936 ? S 0:00 /usr/sbin/smbd --foreground --no-process-group
937 ? S 0:00 /usr/sbin/smbd --foreground --no-process-group
939 ? S 0:00 /usr/sbin/smbd --foreground --no-process-group
pi@raspberrypi:~ $
Make the most of your family and friends , your children grow up too quickly and you don't notice yourself ageing, friends dissapearing, moving on. You make plans for your future, but they can all be smashed in an instant, live life and enjoy. :)

doubleudee1
Posts: 158
Joined: Fri Nov 30, 2018 2:39 pm
Location: Wales

Re: ARRRRGGGHHHH Its happened again! - Lost Samba settings

Mon Sep 16, 2019 8:48 am

This shows when windows 10 deprecated features:-

https://www.ghacks.net/2017/12/20/wind ... homegroup/
Make the most of your family and friends , your children grow up too quickly and you don't notice yourself ageing, friends dissapearing, moving on. You make plans for your future, but they can all be smashed in an instant, live life and enjoy. :)

doubleudee1
Posts: 158
Joined: Fri Nov 30, 2018 2:39 pm
Location: Wales

Re: ARRRRGGGHHHH Its happened again! - Lost Samba settings

Mon Sep 16, 2019 9:11 am

I've even re-entered it in windows just to be sure

Image
Attachments
Capture4.JPG
Capture4.JPG (50.56 KiB) Viewed 264 times
Make the most of your family and friends , your children grow up too quickly and you don't notice yourself ageing, friends dissapearing, moving on. You make plans for your future, but they can all be smashed in an instant, live life and enjoy. :)

hortimech
Posts: 323
Joined: Wed Apr 08, 2015 5:52 pm

Re: ARRRRGGGHHHH Its happened again! - Lost Samba settings

Mon Sep 16, 2019 9:13 am

OK, that shows that 'smbd' is running, but 'nmbd' isn't, you only really need 'nmbd' for network browsing, so that shouldn't be your problem.

Running:

Code: Select all

smbclient -L localhost -N


Should produce output like this:

Code: Select all

Unable to initialize messaging context
Anonymous login successful

	Sharename       Type      Comment
	---------       ----      -------
	testshare       Disk      test share
	IPC$            IPC       IPC Service (Samba 4 Client raspberrypi)
SMB1 disabled -- no workgroup available
If you are not getting something similar to the above, then you need to find out why.

It is unlikely to be the firewall on your router, the command is run entirely on your rpi.
Also 'homegroup' does not equal 'workgroup'

doubleudee1
Posts: 158
Joined: Fri Nov 30, 2018 2:39 pm
Location: Wales

Re: ARRRRGGGHHHH Its happened again! - Lost Samba settings

Mon Sep 16, 2019 9:21 am

Thanks, running
smbclient -L localhost -N
Unable to initialize messaging context
Anonymous login successful
tree connect failed: NT_STATUS_ACCESS_DENIED

? still like earlier problem?
Make the most of your family and friends , your children grow up too quickly and you don't notice yourself ageing, friends dissapearing, moving on. You make plans for your future, but they can all be smashed in an instant, live life and enjoy. :)

doubleudee1
Posts: 158
Joined: Fri Nov 30, 2018 2:39 pm
Location: Wales

Re: ARRRRGGGHHHH Its happened again! - Lost Samba settings

Mon Sep 16, 2019 9:32 am

OK, enough of this, I think I've wasted enough of you guys time (sorry and thanks).

I'm gonna try one or two things again then if they don't work I'm going to reload the lot from scratch, go back to the load screen of NOOBS and press the UP key to reload it all.

Will let yo know if it's successfull.

WD
Make the most of your family and friends , your children grow up too quickly and you don't notice yourself ageing, friends dissapearing, moving on. You make plans for your future, but they can all be smashed in an instant, live life and enjoy. :)

hortimech
Posts: 323
Joined: Wed Apr 08, 2015 5:52 pm

Re: ARRRRGGGHHHH Its happened again! - Lost Samba settings

Mon Sep 16, 2019 9:36 am

OK, try this smb.conf:
[global]
log file = /var/log/samba/log.%m
logging = file
map to guest = Bad User
max log size = 1000
obey pam restrictions = Yes
pam password change = Yes
panic action = /usr/share/samba/panic-action %d
server role = standalone server
unix password sync = Yes
usershare allow guests = Yes

[printers]
browseable = No
comment = All Printers
create mask = 0700
path = /var/spool/samba
printable = Yes

[CCTV_In]
comment = Incoming File From CCTV Cameras
create mask = 0777
directory mask = 0777
guest ok = Yes
path = /home/pi/CCTV_In ## added for 4TB HDD
read only = no

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
Restart smbd and run the smbclient command again.

doubleudee1
Posts: 158
Joined: Fri Nov 30, 2018 2:39 pm
Location: Wales

Re: ARRRRGGGHHHH Its happened again! - Lost Samba settings

Mon Sep 16, 2019 9:53 am

OK thanks, this time I get :-

smbclient -L localhost -N
Unable to initialize messaging context
Anonymous login successful

Sharename Type Comment
--------- ---- -------
CCTV_In Disk Incoming File From CCTV Cameras
print$ Disk Printer Drivers
IPC$ IPC IPC Service (Samba 4.9.5-Debian)
Reconnecting with SMB1 for workgroup listing.
Anonymous login successful

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

Workgroup Master
--------- -------
HOME BTHUB6
WORKGROUP RASPBERRYPI

Still cant get windows to log into shared drive though? (even RPI not showing under network)
Make the most of your family and friends , your children grow up too quickly and you don't notice yourself ageing, friends dissapearing, moving on. You make plans for your future, but they can all be smashed in an instant, live life and enjoy. :)

hortimech
Posts: 323
Joined: Wed Apr 08, 2015 5:52 pm

Re: ARRRRGGGHHHH Its happened again! - Lost Samba settings

Mon Sep 16, 2019 10:11 am

Is there anything in the log file now ?
look in /var/log/samba/log.%m , where '%m' should a computer name

If not, add 'log level = 3' to smb.conf, restart smbd and try again

Is 'SMBv1' allowed on your Win10 computer ?

doubleudee1
Posts: 158
Joined: Fri Nov 30, 2018 2:39 pm
Location: Wales

Re: ARRRRGGGHHHH Its happened again! - Lost Samba settings

Mon Sep 16, 2019 11:19 am

in log.billnbevs-pc I have:-

[2019/09/16 10:54:34.459688, 0] ../source3/smbd/service.c:782(make_connection_$
make_connection_snum: canonicalize_connect_path failed for service CCTV_In, p$
Make the most of your family and friends , your children grow up too quickly and you don't notice yourself ageing, friends dissapearing, moving on. You make plans for your future, but they can all be smashed in an instant, live life and enjoy. :)

hortimech
Posts: 323
Joined: Wed Apr 08, 2015 5:52 pm

Re: ARRRRGGGHHHH Its happened again! - Lost Samba settings

Mon Sep 16, 2019 12:17 pm

Is the ntfs-3g package installed ?
If it isn't install it
If it is, try adding these lines to your smb.conf:

Code: Select all

allow insecure wide links = yes
wide links = yes

doubleudee1
Posts: 158
Joined: Fri Nov 30, 2018 2:39 pm
Location: Wales

Re: ARRRRGGGHHHH Its happened again! - Lost Samba settings

Mon Sep 16, 2019 2:32 pm

yes I had ntfs 3-g loaded.

I just decided to start from scratch, followed this guide https://www.juanmtech.com/samba-file-sh ... pberry-pi/
The only change I made to the guide was to put 'mkdir ~/CCTV_In' where it says to put 'mkdir ~/share'.

Weird thing is, I got as far as 'STEP 6' and then opened up windows explorer, clicked on 'network' But I'm having no popup window asking me for credentials?

also when I click on 'RASPBERRYPI' I can see the image below
Image

If I click on 'CCTV_In' i get the message that Windows cannot access CCTV_In that I was having in the beginning?
But if I click on the pi folder it opens up with no problem, and doesn't ask me for credentials? I can se and access all that is inside it, including a folder called 'CCTV_In?
I couldn't open anything before so there is some progress, but still a problem somewhere, and I haven.t even connected up my external HDD yet (I disconnected it for the fresh start).
Attachments
NewCapture2.JPG
NewCapture2.JPG (64.81 KiB) Viewed 194 times
Make the most of your family and friends , your children grow up too quickly and you don't notice yourself ageing, friends dissapearing, moving on. You make plans for your future, but they can all be smashed in an instant, live life and enjoy. :)

User avatar
DougieLawson
Posts: 36312
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: ARRRRGGGHHHH Its happened again! - Lost Samba settings

Mon Sep 16, 2019 2:34 pm

What shows up in your level 3 log files when you get that failure?
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

doubleudee1
Posts: 158
Joined: Fri Nov 30, 2018 2:39 pm
Location: Wales

Re: ARRRRGGGHHHH Its happened again! - Lost Samba settings

Mon Sep 16, 2019 3:02 pm

in billnbevs-pc log I get a whole lot of

[2019/09/16 15:37:13.104588, 0] ../source3/smbd/service.c:782(make_connection_$
make_connection_snum: canonicalize_connect_path failed for service CCTV_In, p$
[2019/09/16 15:37:13.107577, 0] ../source3/smbd/service.c:782(make_connection_$
make_connection_snum: canonicalize_connect_path failed for service CCTV_In, p$
[2019/09/16 15:37:15.199865, 0] ../source3/smbd/service.c:782(make_connection_$
make_connection_snum: canonicalize_connect_path failed for service CCTV_In, p$
[2019/09/16 15:37:15.201666, 0] ../source3/smbd/service.c:782(make_connection_$
make_connection_snum: canonicalize_connect_path failed for service CCTV_In, p$
[2019/09/16 15:37:56.673707, 0] ../source3/smbd/service.c:782(make_connection_$
make_connection_snum: canonicalize_connect_path failed for service CCTV_In, p$

In log.nmbd I get

[2019/09/16 14:20:56.784583, 0] ../lib/util/become_daemon.c:138(daemon_ready)
daemon_ready: STATUS=daemon 'nmbd' finished starting up and ready to serve co$
[2019/09/16 14:21:19.854712, 0] ../source3/nmbd/nmbd_become_lmb.c:397(become_l$
*****

Samba name server RASPBERRYPI is now a local master browser for workgroup WOR$

*****
[2019/09/16 14:21:19.855264, 0] ../source3/nmbd/nmbd_become_lmb.c:397(become_l$
*****

Samba name server RASPBERRYPI is now a local master browser for workgroup WOR$

*****

and in log.smdb I got

[2019/09/16 14:20:54.876722, 0] ../lib/util/become_daemon.c:138(daemon_ready)
daemon_ready: STATUS=daemon 'smbd' finished starting up and ready to serve co$
[2019/09/16 14:35:47.515163, 0] ../lib/util/become_daemon.c:138(daemon_ready)
daemon_ready: STATUS=daemon 'smbd' finished starting up and ready to serve co$
[2019/09/16 14:39:35.733265, 0] ../lib/util/become_daemon.c:138(daemon_ready)
daemon_ready: STATUS=daemon 'smbd' finished starting up and ready to serve co$
Make the most of your family and friends , your children grow up too quickly and you don't notice yourself ageing, friends dissapearing, moving on. You make plans for your future, but they can all be smashed in an instant, live life and enjoy. :)

hortimech
Posts: 323
Joined: Wed Apr 08, 2015 5:52 pm

Re: ARRRRGGGHHHH Its happened again! - Lost Samba settings

Mon Sep 16, 2019 3:43 pm

Would you like to try our documentation ?
https://wiki.samba.org/index.php/Settin ... one_Server

That page you pointed to is okay as far as it goes, but it doesn't tell you why you should do things and it gets things wrong and adds default settings to smb.conf, the sample one provided might just as well have been this:

Code: Select all

[global]
server string = The Pi File Center

[HOMEPI]
path = /home/pi
read only = no
create mask=0777
directory mask=0777
The share comment amused me:

Code: Select all

comment = No comment
'No comment' is a comment

It is looking more and more like that your user cannot connect to your share over Samba.

Return to “Beginners”