/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/ubi0_1 on /overlay type ubifs (rw,noatime)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
/dev/sda1 on /home/mh/S2 type ext4 (rw,relatime,data=ordered)
That's a curious one. It looks like the first (or only) partition on the disk is mounted to /home/mh/S2, and the samba process ought to be sharing it as \S2 for any clients which browse to it. It's not immediately clear why the /mnt/S2 entry is appearing.
Most configuration information is usually held in /etc. Just out of curiosity, what does grep -lr S2 /etc return?
The disk mounted to /home/mh/S2 is an USB-stick. Automounting it works, however every time I remove it and plug it in again it gets mounted again, however even this messes up the samba-config.
This is really my fundamental problem - removing and plugging in the USB-stick destroys my samba-config - and it is not clear to me why this action triggers a rewrite of the samba-config in the first place...
Here is the output of your grep:
mh@an:~$ sudo grep -lr S2 /etc
/etc/board.d/01_leds
/etc/config/samba
/etc/config/fstab
/etc/config/.samba.uci-AobnHi
/etc/config/.samba.uci-pFOmEh
grep: /etc/localtime: No such file or directory
/etc/mtab
grep: /etc/ppp/resolv.conf: No such file or directory
/etc/samba/lowcase.dat
/etc/samba/upcase.dat
/etc/samba/smb.conf
/etc/ssl/certs/1e08bfd1.0
/etc/ssl/certs/2b349938.0
/etc/ssl/certs/2c543cd1.0
/etc/ssl/certs/349f2832.0
/etc/ssl/certs/3bde41ac.0
/etc/ssl/certs/3e44d2f7.0
/etc/ssl/certs/40193066.0
/etc/ssl/certs/4f316efb.0
/etc/ssl/certs/54657681.0
/etc/ssl/certs/5d3033c5.0
/etc/ssl/certs/6410666e.0
/etc/ssl/certs/76cb8f92.0
/etc/ssl/certs/8160b96c.0
/etc/ssl/certs/87229d21.0
/etc/ssl/certs/9168f543.0
/etc/ssl/certs/988a38cb.0
/etc/ssl/certs/9f0f5fd6.0
/etc/ssl/certs/AffirmTrust_Commercial.crt
/etc/ssl/certs/AffirmTrust_Premium.crt
/etc/ssl/certs/Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.crt
/etc/ssl/certs/Buypass_Class_2_Root_CA.crt
/etc/ssl/certs/Buypass_Class_3_Root_CA.crt
/etc/ssl/certs/Certinomis_-_Root_CA.crt
/etc/ssl/certs/Certplus_Root_CA_G1.crt
/etc/ssl/certs/Certum_Trusted_Network_CA_2.crt
/etc/ssl/certs/Cybertrust_Global_Root.crt
/etc/ssl/certs/EC-ACC.crt
/etc/ssl/certs/GeoTrust_Global_CA.crt
/etc/ssl/certs/GeoTrust_Primary_Certification_Authority_-_G3.crt
/etc/ssl/certs/Go_Daddy_Root_Certificate_Authority_-_G2.crt
/etc/ssl/certs/IdenTrust_Public_Sector_Root_CA_1.crt
/etc/ssl/certs/Microsec_e-Szigno_Root_CA_2009.crt
/etc/ssl/certs/NetLock_Arany_=Class_Gold=_Főtanúsítvány.crt
/etc/ssl/certs/OISTE_WISeKey_Global_Root_GA_CA.crt
/etc/ssl/certs/OISTE_WISeKey_Global_Root_GB_CA.crt
/etc/ssl/certs/OpenTrust_Root_CA_G1.crt
/etc/ssl/certs/QuoVadis_Root_CA_2.crt
/etc/ssl/certs/Security_Communication_RootCA2.crt
/etc/ssl/certs/SwissSign_Gold_CA_-_G2.crt
/etc/ssl/certs/TUBITAK_Kamu_SM_SSL_Kok_Sertifikasi_-_Surum_1.crt
/etc/ssl/certs/Taiwan_GRCA.crt
/etc/ssl/certs/TrustCor_RootCert_CA-1.crt
/etc/ssl/certs/TrustCor_RootCert_CA-2.crt
/etc/ssl/certs/VeriSign_Universal_Root_Certification_Authority.crt
/etc/ssl/certs/b1b8a7f3.0
/etc/ssl/certs/b727005e.0
/etc/ssl/certs/ba89ed3b.0
/etc/ssl/certs/c01cdfa2.0
/etc/ssl/certs/ca-certificates.crt
/etc/ssl/certs/ca6e4ad9.0
/etc/ssl/certs/cbf06781.0
/etc/ssl/certs/cd58d51e.0
/etc/ssl/certs/d7e8dc79.0
/etc/ssl/certs/e2799e36.0
/etc/ssl/certs/e73d606e.0
/etc/ssl/certs/e8de2f56.0
/etc/ssl/certs/ePKI_Root_Certification_Authority.crt
/etc/ssl/certs/ff34af3f.0
/etc/ssl/certs/thawte_Primary_Root_CA_-_G3.crt
/etc/tertf/mac_vendor.db
grep: /etc/systemd/system/multi-user.target.wants/sundtek.service: No such file or directory
/etc/tvheadend/bouquet/c99525a2d2480333891b24986e8c67da
/etc/tvheadend/bouquet/56a9773574a693b3464dc5c012f0b62b
/etc/tvheadend/bouquet/7a6a15ed39014bd451178b42950d950d
/etc/tvheadend/bouquet/5bce296dfc017c771cc437926d4d3ad0
/etc/tvheadend/bouquet/5fdc7f68ee4db8c3ee0c55c05bc2ede8
/etc/tvheadend/bouquet/4ba717974c20f53390794f8d7d80c489
grep: /etc/tvheadend/epgdb.v2: No such file or directory
/etc/mpd.conf
I reckon you can probably ignore everything in /etc/ssl but, in your shoes, I would certainly be wondering what's in the other configuration files. Maybe one of them might shed some light on what's causing /mnt/S2 to appear.
I could also probably work around it by simply using the /mnt/S2 mount-point that is generated (rather than /home/mh/S2 that I want), but I am curious...
Even if I find another config-file - how does the whole process work?
I understand that when I restart samba /etc/config/samba is used to re-generate the samba-config in /etc/samba/smb.conf but how can re-inserting a usb-stick also trigger this?
Is it the event that a new usb-device shows up on the bus, is it a mount-event - what is the trigger and how does it propagate?
How are mounts and generating a samba-config connected?
The only config files that matter here are /etc/config/fstab (see above), /etc/config/samba (see above) and /etc/samba/smb.conf (generated).
The files below /etc/certs are certificates, the ones below /etc/tvheadend belong to a software for a tv-stick.
/etc/mpd.conf is a config-file for mpd that simply configures that references that stick as the directory where to find media and /etc/mtab is a symlink to /proc/mounts.
@tmomas it's not the first time some users are being unpleasant in their reaction to people trying to help, is it possible for me to permanently ignore such users so I don't ever try to help those?