| 
		
	
	
		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.
 
	
	
	
		
	Posts: 1,149 
	Threads: 22 
	Joined: Feb 2014
	
 Reputation: 
0 
	
	
		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
 
![[Image: EtYqOrS.png%5D]](http://imgur.com/EtYqOrS.png%5D)  
A gun in your hand is worth more than a whole police force on the phone.
 
	
	
	
		
	Posts: 9,006 
	Threads: 567 
	Joined: Feb 2014
	
 Reputation: 
12 
	
	
	
		
	Posts: 1,484 
	Threads: 96 
	Joined: Mar 2014
	
 Reputation: 
0 
	
		
		
		09-11-2014, 10:11 AM 
(This post was last modified: 09-11-2014, 10:14 AM by Wirezfree.)
		
	 
		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
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: #!/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
   
   
	
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)
 
	
	
	
		
	Posts: 34 
	Threads: 6 
	Joined: Dec 2014
	
 Reputation: 
0 
	
		
		
		01-07-2015, 03:24 AM 
(This post was last modified: 01-07-2015, 03:30 AM by greenisland.)
		
	 
		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.135978621.xyz/manual/network.html#nas )  because it covers a lot, but  I could not find a section on mounting a network drive.
 
Thanks again
	 
	
	
	
		
	Posts: 857 
	Threads: 47 
	Joined: Feb 2014
	
 Reputation: 
0 
	
	
		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?
	 
	
	
	
		
	Posts: 34 
	Threads: 6 
	Joined: Dec 2014
	
 Reputation: 
0 
	
		
		
		01-07-2015, 06:51 AM 
(This post was last modified: 01-07-2015, 06:53 AM by greenisland.)
		
	 
		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.
 
	
	
	
		
	Posts: 1,484 
	Threads: 96 
	Joined: Mar 2014
	
 Reputation: 
0 
	
	
		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.110PING 10.10.100.110 (10.10.100.110) 56(84) bytes of data.
 64 bytes from 10.10.100.110: icmp_seq=1 ttl=64 time=0.338 ms
 64 bytes from 10.10.100.110: icmp_seq=2 ttl=64 time=0.313 ms
 64 bytes from 10.10.100.110: icmp_seq=3 ttl=64 time=0.268 ms
 ^C
 --- 10.10.100.110 ping statistics ---
 8 packets transmitted, 8 received, 0% packet loss, time 6998ms
 rtt min/avg/max/mdev = 0.268/0.306/0.338/0.023 ms
 dave@asus-mini-1:~$
Then name
 Code: dave@asus-mini-1:~$ ping nas1-synPING nas1-syn (10.10.100.110) 56(84) bytes of data.
 64 bytes from 10.10.100.110: icmp_seq=1 ttl=64 time=0.263 ms
 64 bytes from 10.10.100.110: icmp_seq=2 ttl=64 time=0.298 ms
 64 bytes from 10.10.100.110: icmp_seq=3 ttl=64 time=0.299 ms
 ^C
 --- nas1-syn ping statistics ---
 6 packets transmitted, 6 received, 0% packet loss, time 4998ms
 rtt min/avg/max/mdev = 0.263/0.292/0.311/0.019 ms
 dave@asus-mini-1:~$
I chopped a bit of the results out to keep post small. 
Do both commands work & timings look similar.?
 
Dave
	
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)
 
	
	
	
		
	Posts: 34 
	Threads: 6 
	Joined: Dec 2014
	
 Reputation: 
0 
	
	
		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/a...from-fstab
http://www.samba.org/samba/docs/man/manp...ifs.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"
	 
	
	
	
		
	Posts: 34 
	Threads: 6 
	Joined: Dec 2014
	
 Reputation: 
0 
	
		
		
		01-07-2015, 01:19 PM 
(This post was last modified: 01-07-2015, 01:21 PM by greenisland.)
		
	 
		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. ;-)
 |