And Again... can't access to my SMB Windows 10 Shared

Yes… exactly.

This is the output of the debug commands:

osmc@osmc:~$ sudo systemctl stop autofs
osmc@osmc:~$ sudo automount -f -v -d
Starting automounter version 5.1.2, master map /etc/auto.master
using kernel protocol version 5.03
lookup_nss_read_master: reading master file /etc/auto.master
do_init: parse(sun): init gathered global options: (null)
lookup_read_master: lookup(file): read entry +dir:/etc/auto.master.d
lookup_nss_read_master: reading master dir /etc/auto.master.d
lookup(dir): dir map /etc/auto.master.d missing or not readable
lookup(file): failed to read included master map dir:/etc/auto.master.d
lookup_read_master: lookup(file): read entry +auto.master
lookup_nss_read_master: reading master files auto.master
do_init: parse(sun): init gathered global options: (null)
lookup(file): failed to read included master map auto.master
lookup_read_master: lookup(file): read entry /-
master_do_mount: mounting /-
automount_path_to_fifo: fifo name /var/run/autofs.fifo--
lookup_nss_read_map: reading map file /etc/auto.smb.shares
do_init: parse(sun): init gathered global options: (null)
st_ready: st_ready(): state = 0 path /-

Now it’s not anymore works whit the “old” configuration… omg :slight_smile:

First Edit
When i click CTRL-C to break on same it’s exit this:

^Cdo_notify_state: signal 2
master_notify_state_change: sig 2 switching /- from 1 to 5
st_prepare_shutdown: state 1 path /-
expire_proc: exp_proc = 1951962192 path /-
expire_cleanup: got thid 1951962192 path /- stat 0
expire_cleanup: sigchld: exp 1951962192 finished, switching from 5 to 7
st_shutdown: state 5 path /-
automount_path_to_fifo: fifo name /var/run/autofs.fifo--
shut down path /-
autofs stopped
osmc@osmc:~$

Repeat… now it’s not works also whit “old” configuration whit credentials directly in auto.smb.shares. Oh my goodness… What a mess…

Oh ok… and it’s not ok… it’s not works anymore as ever.
It’s not works also whit credentials on auto.smb.shares and also on external credentials files.

Good… and it’s not good :slight_smile:

It’s windows issue ? It’s windows 10 the problems ? It’s windows 10 have a logout timeout for user osmc ?

I don’t have idea how i need to do… i have also reboot my Pi2… apparently whitout success.

Which would indicate that there must be a typo in your auto.smb.shares file
Post the file auto.smb.shares here (via paste-log /etc/auto.smb.shares) so that we can check.

Whitout any problems…

osmc@osmc:~$ paste-log /etc/auto.smb.shares
https://paste.osmc.tv/meqifosava
osmc@osmc:~$

You can see at this moment i have tryed to reuse the “old” working config whit the credentials included in this file.
With this it worked until I touched to test the credentials on the external file :slight_smile:

Now, after lunch, i have also reboot my windows pc… apparently there’s no help… sigh…

1st Edit
Only for test… i can ping the ip of my windows 10 from ssh:

osmc@osmc:~$ ping 192.168.1.2
PING 192.168.1.2 (192.168.1.2): 56 data bytes
64 bytes from 192.168.1.2: seq=0 ttl=128 time=0.944 ms
64 bytes from 192.168.1.2: seq=1 ttl=128 time=0.845 ms
64 bytes from 192.168.1.2: seq=2 ttl=128 time=0.821 ms
64 bytes from 192.168.1.2: seq=3 ttl=128 time=0.870 ms
64 bytes from 192.168.1.2: seq=4 ttl=128 time=0.867 ms
64 bytes from 192.168.1.2: seq=5 ttl=128 time=0.847 ms
64 bytes from 192.168.1.2: seq=6 ttl=128 time=0.850 ms
^C
--- 192.168.1.2 ping statistics ---
7 packets transmitted, 7 packets received, 0% packet loss
round-trip min/avg/max = 0.821/0.863/0.944 ms
osmc@osmc:~$

For another test… from my Android Smartphone i have tryed to access same SMB sharing using the credentials “osmc:osmc” and from here it’s works.
Apparently this little issue in only present on Pi2 side… strange…

Oh… obviously thanks to everyone for the support!
^ ^ ^ ^ ^ ^ It’s very important this part :slight_smile:

That looks ok, what are you getting when you start autofs in debug and try to access the folder?

You speak about use this:

sudo systemctl stop autofs
sudo automount -f -v -d

If yes this is the result:

osmc@osmc:~$ sudo systemctl stop autofs
osmc@osmc:~$ sudo automount -f -v -d
Starting automounter version 5.1.2, master map /etc/auto.master
using kernel protocol version 5.03
lookup_nss_read_master: reading master file /etc/auto.master
do_init: parse(sun): init gathered global options: (null)
lookup_read_master: lookup(file): read entry +dir:/etc/auto.master.d
lookup_nss_read_master: reading master dir /etc/auto.master.d
lookup(dir): dir map /etc/auto.master.d missing or not readable
lookup(file): failed to read included master map dir:/etc/auto.master.d
lookup_read_master: lookup(file): read entry +auto.master
lookup_nss_read_master: reading master files auto.master
do_init: parse(sun): init gathered global options: (null)
lookup(file): failed to read included master map auto.master
lookup_read_master: lookup(file): read entry /-
master_do_mount: mounting /-
automount_path_to_fifo: fifo name /var/run/autofs.fifo--
lookup_nss_read_map: reading map file /etc/auto.smb.shares
do_init: parse(sun): init gathered global options: (null)
st_ready: st_ready(): state = 0 path /-

All it’s stop here. I have tryed to access to “mnt/File Condivisi” from ftp client and it’s empty.

Yes

But the Debug log doesn’t show any access attempt.
I suggest open a second SSH terminal and just run ls /mnt/File\ Condivisi/ when you do that you would need to see action in the autofs debug window even if it fails.

Ok… i thinks in this mode it’s correct…

Problably here you can look both ssh session…

Ok definetly cleary something wrong. You would expect a line like
mounted direct on /mnt/File\ Condivisi/ with timeout 15, freq 4 seconds

  1. Do you have a newline after the config line in auto.smb.shares?
  2. Can you try to rewrite the line?
  3. can you show output of ls -lah /etc/auto*

If you want i can also create a new folder whitout space.
For example now this shared folder it’s on "D:\File Condivisi".

If you thinks it’s better i can try to create a new folder like “D:\Condivisi” whitout space.

Meantime i can reply to this:

  1. Apparently not… there’s no empty line on auto.smb.shares and there’s no empty space at the end of line.

  2. Can i try… it could be a problem the file format ? If i edit this files from windows using notepad++ i see it’s format it’s “Unix (LF)”. It’s ok ?

  3. Yes i also can do:

osmc@osmc:~$ ls -lah /etc/auto*
-rw-r--r-- 1 root root  14K dic 23  2016 /etc/autofs.conf
-rw-r--r-- 1 root root  841 gen 31 12:30 /etc/auto.master
-rw-r--r-- 1 root root  524 dic 23  2016 /etc/auto.misc
-rwxr-xr-x 1 root root 1,1K dic 23  2016 /etc/auto.net
-rwxr-xr-x 1 root root 2,2K dic 23  2016 /etc/auto.smb
-rwxr-xr-x 1 root root  140 gen 31 12:19 /etc/auto.smb.shares
osmc@osmc:~$

Remember upper here… i have also tryed to set the chmod to 600 but apparently it’s same result.

You thinks it’s a great idea to re-start all from scratch ? For example it’s possible to uninstall and reinstall autofs and restart to recreate all files from beginning ?
If yes this time i thinks i use “osmc” as ssh user…

Surely avoiding spaces would make the whole thing easier (but if it worked before then it should be fine). But if you can avoid them please do.

Having a return afterwards doesn’t harm.

I would avoid that, just in your ssh terminal do sudo nano /etc/auto.smb.shares

ok… i have reinstall autofs from beginning… this time from “osmc” user.
This is session result:

osmc@osmc:~$ sudo apt-get install autofs
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze
Lettura informazioni sullo stato... Fatto
I seguenti pacchetti NUOVI saranno installati:
  autofs
0 aggiornati, 1 installati, 0 da rimuovere e 0 non aggiornati.
È necessario scaricare 411 kB di archivi.
Dopo quest'operazione, verranno occupati 2.047 kB di spazio su disco.
Scaricamento di:1 http://ftp.debian.org/debian stretch/main armhf autofs armhf 5.1.2-1 [411 kB]
Recuperati 411 kB in 0s (528 kB/s)
Selezionato il pacchetto autofs non precedentemente selezionato.
(Lettura del database... 33954 file e directory attualmente installati.)
Preparativi per estrarre .../autofs_5.1.2-1_armhf.deb...
Estrazione di autofs (5.1.2-1)...
Configurazione di autofs (5.1.2-1)...

Creating config file /etc/auto.master with new version

Creating config file /etc/auto.net with new version

Creating config file /etc/auto.misc with new version

Creating config file /etc/auto.smb with new version

Creating config file /etc/default/autofs with new version
Created symlink /etc/systemd/system/multi-user.target.wants/autofs.service → /lib/systemd/system/autofs.service.
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Elaborazione dei trigger per systemd (232-25+deb9u12)...
osmc@osmc:~$

I have also recreate all files… whit the newest folder all it’s works.
Now the auto.smb.shares it’s:

/mnt/Condivisi/ -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc,vers=3.0 ://192.168.1.2/Condivisa/

I right now try to all the folder whit the space… wait a moment and for an Edit :thinking:

1st EDIT
OOOOHHH YES!! IT’s Working AGAIN also the “space named” folder!! Right now my auto.smb.shares it’s:

/mnt/Condivisi/ -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc,vers=3.0 ://192.168.1.2/Condivisa/
/mnt/File\ Condivisi/ -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc,vers=3.0 ://192.168.1.2/File\ Condivisi/

Now, if it’s correct… I have to be careful not to delete the mounted folders otherwise the files are deleted from my pc. It’s correct ?

At this point if i want to remove the folder “Condivisa” created for test i thinks i need to remove (or comment out the line) from auto.smb.shares. Restart Autofs… check if the folder on /mnt it’s realy empty and only right now i can delete it and leave only the other “File Condivisi” :triumph::dizzy_face:

Well using rmdir would never remove a none empty folder

Yes… i already do this.
I comment out a line on auto.smb.shares. Restart autofs. Check by FTP and recheck by SSH if the mount it’s REAL empty and i have removed the empty mount by FTP client.

Now apparently all it’s works… for the moment.
For future test, i leave the “newest” folder called “Condivisa” on my PC… i delete all files i have copyed inside and leave it empty if need for future test :slight_smile: