network share drives me mad - Printable Version +- Linux Lite Forums (https://www.freecinema2022.gq/forums) +-- Forum: Hardware - Support (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=6) +--- Forum: Network (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=24) +--- Thread: network share drives me mad (/showthread.php?tid=817) |
network share drives me mad - mybook - 09-08-2014 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. Re: network share drives me mad - N4RPS - 09-09-2014 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 Re: network share drives me mad - Valtam - 09-09-2014 https://www.freecinema2022.gq/manual/network.html#nas Re: network share drives me mad - Wirezfree - 09-11-2014 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: gksu leafpad /etc/rc.local Note, username & password are your normal login username/password, there are ways to to hide this, but it requires more steps. Code: #!/bin/sh -e 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 Re: network share drives me mad - greenisland - 01-07-2015 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.freecinema2022.gq/manual/network.html#nas) because it covers a lot, but I could not find a section on mounting a network drive. Thanks again Re: network share drives me mad - Scott(0) - 01-07-2015 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. 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 - greenisland - 01-07-2015 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. Re: network share drives me mad - Wirezfree - 01-07-2015 Hi greenisland, I have recently been through this again on a new LL2.2 install and it worked again for me... It's baffling why it should work manually on the 2nd run of the manual sudo command.?? First, lets check network connectivity/timing, try to ping the NAS by IP, then name, see if there are any name resolution/timing issues.? ((use your IP NAS address/name, and a ctrl c to stop the ping)) By I.P Code: dave@asus-mini-1:~$ ping 10.10.100.110 Code: dave@asus-mini-1:~$ ping nas1-syn I chopped a bit of the results out to keep post small. Do both commands work & timings look similar.? Dave Re: network share drives me mad - greenisland - 01-07-2015 Yes, they look very similar when I ping the name vs pinging the IP address. I wonder if my problem is related to this: http://serverfault.com/questions/70762/allowing-a-user-to-mount-a-samba-share-from-fstab http://www.samba.org/samba/docs/man/manpages-3/mount.cifs.8.html "It is possible to set the mode for mount.cifs to setuid root to allow non-root users to mount shares to directories for which they have write permission." share|improve this answer answered Oct 2 '09 at 14:14 James Curbo 1014 Not anymore: bugs.launchpad.net/ubuntu/+source/cifs-utils/+bug/657900 – Calmarius Feb 22 '13 at 10:23 That is only for Ubuntu - Debian has changed its behavior back to setting mount.cifs setuid (see here and here) based on upstream. In any case, it was still possible to set it setuid, just not recommended. – James Curbo Feb 22 '13 at 17:31 ----------------------------------- And perhaps this explains why the setup I was using with Solydxk in the past (debian) does not work for me in this ubuntu environment? Unfortunately I do not know what it means to "set the mode for mount.cifs to setuid" Re: network share drives me mad - greenisland - 01-07-2015 Here is the exact line I am using (I have substituted xxx's but I have verified and reverified that I have typed them correctly): mount -t cifs -o username=xxx,password=xxxx,uid=xxx,gid=users //dellserver/c /mnt/dellserver When executed from terminal: sudo mount -t cifs -o username=xxx,password=xxxx,uid=xxx,gid=users //dellserver/c /mnt/dellserver Fails the first time with the error mount error(5): Input/output error Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) And then when re-executed EXACTLY the same way, by hitting the up arrow in terminal to execute the same line, it works the second time without any error at all, and the drive is mounted. But I am finding that putting multiple lines in the rc.local file does not achieve the same thing as executing it twice from terminal. ;-) |