You are Here:
Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section



network share drives me mad

Author (Read 13523 times)

0 Members and 1 Guest are viewing this topic.

Re: network share drives me mad
« Reply #7 on: January 07, 2015, 01:51:07 AM »
 

greenisland

  • New to Forums
  • *
  • 34
    Posts
  • Reputation: 6
  • Linux Lite Member
    • View Profile
Thanks for your reply Scott.  As best I can tell, it does nothing when I run it from the rc.local file.

I went back and made sure my rc.local file was exactly parallel to the suggested version, and then commented out my fstab line to be sure that was not interfering.

I rebooted, and when it came up, the network share was not connected. (tested by running df from terminal)

Then, from the same terminal, i executed the same command that was in the rc.local (by putting sudo in front).

The first time I ran it I got the same error:  "mount error(5): Input/output error  Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)"
The second time I ran the exact same command, it gave no error, and when I check using df, the network share is mounted properly.

i am afraid I am stumped.  I prefer this mount -t command instead of using the fstab file, but I must have something set wrong for it to fail the first time through.  And of course that does not explain why it succeeds the second time the command is issued.

Thanks again for any suggestions or commentary (aside from my obvious lack of linux skill!)  :-)


One more comment:  I do appreciate being able to find this thread.  I think it is consistent with the targeting of this distribution that a lot of your users are going to want to establish automatic connections to networked machines in a small office environment, and that doesn't seem to be much of a priority on other distributions.  I've already found your samba file and instructions VERY helpful rather than just including the standard setup like a lot of distros seem to do.  So thanks again.
« Last Edit: January 07, 2015, 01:53:21 AM by greenisland »
 

Re: network share drives me mad
« Reply #6 on: January 07, 2015, 01:04:06 AM »
 

Scott

  • Global Moderator
  • Gold Level Poster
  • *****
  • 857
    Posts
  • Reputation: 186
  • Linux Lite Member
    • View Profile

  • CPU: Dual core Intel Core i3 M 330

  • MEMORY: 6Gb

  • VIDEO CARD: Intel Integrated Graphics
Hi Greenisland,

Quote
I am trying to mount a network drive at book using fstab, but I would be perfectly happy to do the same thing by putting a mount command such as is described here in my rc.local file.

For some reason I am finding that when I test the command from a terminal, by putting for example

sudo mount -t cifs -o username=username,password=yourpassword,uid=username,gid=users //192.168.10.11/Files /home/dave/ZShares/Files

I find that it does not work the first time, and gives me the error

I don't have a specific answer but for clarification on my end, have you tried the test command above in the rc.local file? I understand that it gives an error in the terminal but what happens when it's run from rc.local?
 

Re: network share drives me mad
« Reply #5 on: January 06, 2015, 10:24:53 PM »
 

greenisland

  • New to Forums
  • *
  • 34
    Posts
  • Reputation: 6
  • Linux Lite Member
    • View Profile
My question is (I think) a continuation or subtlety of this question so I will add it here.

I am trying to mount a network drive at book using fstab, but I would be perfectly happy to do the same thing by putting a mount command such as is described here in my rc.local file.

For some reason I am finding that when I test the command from a terminal, by putting for example

sudo mount -t cifs -o username=username,password=yourpassword,uid=username,gid=users //192.168.10.11/Files /home/dave/ZShares/Files

I find that it does not work the first time, and gives me the error

mount error(5): Input/output error
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


But if I issue EXACTLY the same command a second time, it works without giving errors of any kind and mounts the drive.  From the terminal I can recreate this repeatedly --

sudo umount -a dismounts everything, including the network drive

  >>> if I then issue:

sudo mount -a        >>>>>>> I get the error

If I then issue

sudo mount -a a SECOND time

I get a mounted network drive and no error!

Probably if I could figure out why this is happening (the need to execute the command twice) I could figure out the rest of my problems.

Can anyone suggest an answer?  =---  thanks

PS -- I was hoping to find a section of the excellent startup manual on networks (https://www.linuxliteos.com/manual/network.html#nas)  because it covers a lot, but  I could not find a section on mounting a network drive.

Thanks again
« Last Edit: January 06, 2015, 10:30:34 PM by greenisland »
 

Re: network share drives me mad
« Reply #4 on: September 11, 2014, 06:11:20 AM »
 

Wirezfree

  • PayPal Supporter
  • Platinum Level Poster
  • *****
  • 1484
    Posts
  • Reputation: 405
  • Linux Lite "Advocate"
    • View Profile

  • CPU: i7-4790S

  • MEMORY: 16Gb

  • VIDEO CARD: Intel HD4600 (Integrated)
Hi,

I can feel your pain, a couple of months ago I was facing various Networking/NAS challenges.
After a lot of help on the LL Forum, and Googling I did various things to make it work for me.
YMMV, but for me it's working. I will try to list what I checked and did.

1. I used a fixed IP address on my NAS in it's Network settings, I used the next address up from my Router, e.g Router 192.168.10.10 and NAS = 192.168.10.11
2. I made sure all PC's, NAS and Router are in the same Workgroup, normally the default is "Workgroup", unless you have changed anything.?
3. I ensured the Shares and Users on the NAS had the right Users with Read/Write access to the Shares.
4. I wanted the the "Shares" to be always be connected at Bootup, so I did the following:

> In my /home directory I created a folder called Zshare so it looked like /home/dave/Zshare
   Inside Zshare I created 3 folders to correspond to my NAS Shares: /Archive  /Backup  /Files

> I Then I edited my /etc/rc.local file
Code: [Select]
gksu leafpad /etc/rc.local
and then added mount points from my NAS to the the corresponding Zshare folders at the end of the rc.local file.
Note, username & password are your normal login username/password, there are ways to to hide this, but it requires more steps.
Code: [Select]
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# Network Mount Point mapping, sleep 5 is 5 secs, allow Network to establish
sleep 5
mount -t cifs -o username=username,password=yourpassword,uid=username,gid=users //192.168.10.11/Archive /home/dave/ZShares/Archive
mount -t cifs -o username=username,password=yourpassword,uid=username,gid=users //192.168.10.11/Backup /home/dave/ZShares/Backup
mount -t cifs -o username=username,password=yourpassword,uid=username,gid=users //192.168.10.11/Files /home/dave/ZShares/Files
exit 0

I now have it where a 100% of the time my NAS is always there at boot up, assuming its switched on.!,
It shows the 3 devices/shares in File manager on boot up with full Read/Write access.
Hope this is of some use.

Dave
   
   
« Last Edit: September 11, 2014, 06:14:48 AM by Wirezfree »
Upgrades WIP 2.6 to 2.8 - (6 X 2.6 to 2.8 completed on: 20/02/16 All O.K )
Linux Lite 3.0 Humming on a ASRock N3070 Mobo ~ btrfs RAID 10 Install on 4 Disks :)

Computers Early days:
ZX Spectrum(1982) , HP-150 MS-DOS(1983) , Amstrad CPC464(1984) ,  BBC Micro B+64(1985) , My First PC HP-Vectra(1987)
 

Re: network share drives me mad
« Reply #3 on: September 09, 2014, 02:19:39 PM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8778
    Posts
  • Reputation: 802
  • Linux Lite Member
    • View Profile
    • Linux Lite OS

  • CPU: Intel Core i9-10850K CPU @ 3.60GHz

  • MEMORY: 32Gb

  • VIDEO CARD: nVidia GeForce GTX 1650

  • Kernel: 5.x
 

Re: network share drives me mad
« Reply #2 on: September 09, 2014, 03:22:29 AM »
 

N4RPS

  • Donator
  • Platinum Level Poster
  • **********
  • 1149
    Posts
  • Reputation: 155
  • Knows JUST ENOUGH Linux to be DANGEROUS
    • View Profile
    • Orphans for Christ, Self Advocates of Mecklenburg

  • CPU: Several Different 32-bit & 64-bit CPUs, 2-8 GB RAM

  • MEMORY: 8Gb

  • VIDEO CARD: Several Different AMD and Intel GPUs
Hello!

I hope someone can shed some light on this, When I tried it, the Windows PC talked to the Linux PC, but not vice versa. It kept asking for my Windows password - even when I entered the correct one.

I just finally sidestepped the whole issue with TeamViewer. Now, I can access it not only at the house, but on the go as well...

73 DE N4RPS
Rob


A gun in your hand is worth more than a whole police force on the phone.
 

network share drives me mad
« Reply #1 on: September 08, 2014, 04:35:47 PM »
 

mybook

  • Guest
Hello.

I installed linux lite for my dad a couple of weeks ago and first all went nice and he could access the mybook live NAS without problems, but now when in go to /workgroup/NASdrive/, the next folder is "linuxliteshare" and not what really is the next folder. it also asks a password wich i dont have and i dont need when i access the drive with my manjaro installation. I am baffled, please help.

mybook.
 

 

-->
X Close Ad

Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section