• The forum software that supports hummy.tv has been upgraded to XenForo 2.3!

    Please bear with us as we continue to tweak things, and feel free to post any questions, issues or suggestions in the upgrade thread.

[network-shares-automount] package released

In another thread,
... One is a bug in network-shares-automount which does not handle null passwords. ...
Might this change to lines 62-69 of /mod/sbin/scanmounts fix the issue?
Code:
          if [ $type = "smb" ]; then
              # keep the [user|password etc]=... as they go into mount in that format             
              user=$(ls -1 "$name" | grep -e "^user=")  
              password=$(ls -1 "$name" | grep -e "^password=")
              domain=$(ls -1 "$name" | grep -e "^domain=")
              unc="unc=\\\\$host\\$(echo $folder | sed 's^/^\\\\^g')"
              auth=$user
              [ -n "${password#password=}" ] &&
                      auth=${auth:+${auth},}${password}
              [ -n "$auth" ] && 
                      auth=$auth,
              echo "mount -t cifs \"//$host/$folder\" \"/media/$name\" -o $auth$domain,$unc"
              mount -t cifs "//$host/$folder" "/media/$name" -o "$auth$domain,$unc"
          elif [ $type = "nfs" ]; then
 
Last edited:
Might this change to lines 62-69 of /mod/sbin/scanmounts fix the issue?
It's an improvement in that user=User and password=Password now succeeds in mounting the remote share, but it remains unpopulated. Ditto for user=root and password=xxxx (where xxxx is the password I set for user root for smb access).

Belay that, it's dropped out again. At least the mod didn't break anything else (old samba shares).

user=root password=xxxx (the password I set for smb user root) seems to work, without being populated. Other combinations do not seem to work.

Don't you think this ought to be confined to the beta samba thread?
 
Last edited:
You really did misread the post. Apart from some style issues, the changed lines should just fix the listed problem, when no (a zero-length) password is used, and that isn't the (current) problem in the beta thread. The change shouldn't affect anything else, as you found. Good that it worked otherwise: thanks for the test.

I had a complete rewrite of the scanmounts script, but I can't now recall what state it reached or where I might have put it.
 
Sorry, I was going from the context of solving my problem with the Samba3 beta.

So what are you saying then? Do you mean that your mod should make user= and password= valid strings in [Modsettings] (when accessing a share operated by the current samba)?
 
One further revision needed for user= as well as empty password, as above.

There is a fundamental limitation with the package if the share parameters (password is the likely troublemaker) contain characters that are special or forbidden in filenames. A further issue is characters (eg, "\$) that are special to the shell, but some more fancy coding could probably minimise that.
 
I've just replaced my windows server and installed a new version of Win10. The automounts from this box are now failing with

failed: Host is down
Mount failed...

Has anything by chance changed in windows that is preventing it working. I've changed nothing on the humax and I can access the share from other PCs ok

The humax can ping the Windows server ok
 
What was the old server running?
It might be lacking SMB1 protocol which (I presume) the current version of the cifs package only supports.
 
that was running win10 too, but not an update version. Is there anyway I can check? I still have the old server and when I plug that one in the humax works fine (can't have old and new both plugged in as server names/ips the same!)
 
Sorry to bump this old thread, but it seemed like the best place for this query.

I have enjoyed the use of Network Shares Automount for the last five years. It's brilliant and does exactly what I want. So a great big THANK YOU to the perpetrators of this fine work.

However, a few months ago, it stopped mounting everything, complaining "Cannot allocate memory":-

Code:
192.168.0.16 is on-line - attempting to mount AdBreaker
mount -t cifs //192.168.0.16/FFMPEG /media/AdBreaker -o user=User,password=Password,domain=Workgroup,unc=\\192.168.0.16\FFMPEG
mount: mounting //192.168.0.16/FFMPEG on /media/AdBreaker failed: Cannot allocate memory
192.168.0.16 is on-line - attempting to mount Brutus
mount -t cifs //192.168.0.16/Videos /media/Brutus -o user=User,password=Password,domain=Workgroup,unc=\\192.168.0.16\Videos
mount: mounting //192.168.0.16/Videos on /media/Brutus failed: Cannot allocate memory
I don't think I did anything to provoke it, but I happily accept the blame if I did.

Now I have got some time to fix it, and have tried, but I haven't succeeded. So far, I have:

  • turned it off and back on again
  • uninstalled Network Shares Automount
  • deleted the share and mod folders (carefully)
  • reinstalled Network Shares Automount
  • set it all up again, which I think I did correctly
Code:
/media/My Video/[ModSettings]/smb/AdBreaker
domain=Workgroup
folder=FFMPEG
host=192.168.0.16  <<<<< This is a Win 7 machine, so no updates recently >>>>>
mac=ABABABABABAB
password=Password
shareFolder=on
user=User
wakeConstantly?
wakeNow?
But still no joy.

Does anyone have any suggestions? Especially about "Cannot allocate memory"? Is my Hummy getting forgetful in its old age?

@Black Hole, with respect and kindness: No, I like the convenience of the shares being in My Video and it's not caused me any trouble so far.

PS. I can connect via telnet, but don't really know what to type...
 
Last edited:
I like the convenience of the shares being in My Video and it's not caused me any trouble so far.
It's that kind of thing which will add up to evidence to change my opinion. How long does it take for the HDR-FOX to shut down? (That's when it does things like search for additions to the DLNA index, and recordings requiring thumbnail generation, which I hypothesise will trawl anything in My Video.)
 
There are roughly 20GB free on a 500GB drive. Both Windows and Hummy agree on that figure. That's a 5% availability, which shows as a full pie chart, but I think that is normal because the pie chart graphic on the Hummy is not that accurate. Anyway, it's no different today than yesterday, when Network Shares were not mounted.
 
Back
Top