LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   CIFS automount issue (https://www.linuxquestions.org/questions/linux-newbie-8/cifs-automount-issue-4175527825/)

RRepster 12-07-2014 01:44 PM

CIFS automount issue
 
similar issue enough to not make an entire new thread:
I have an xp box and a RasberryPi running Rasbian (debian based) connected to each other, no internet, no routers etc. I need to automount the shared directory on the windows box: //10.1.1.2/Photos
I can mount it by hand each time by:
sudo mount -t cifs -o username=adam,password=adam //10.1.1.2/Photos /home/pi/photos
that mounts just fine and files are viewable in /home/pi/photos. But putting it in fstab that way doesn't work.
(Yes I have googled constantly so please don't say that, due to constant samba changes its nearly useless).
From the Ubuntu wiki I found this option:
//10.1.1.2/Photos cifs username=adam,password=adam,iocharset=utf8,sec=ntlm 0 0
that method required creating /media/windowsshared file
mount -a passes but navigating to /media/windowsshared shows nothing in there.
I am at my wits end here. Thank you obi-wan-kenobi you're my only hope.

Rob

Teufel 12-09-2014 10:06 PM

Quote:

Originally Posted by RRepster (Post 5280981)
From the Ubuntu wiki I found this option:
//10.1.1.2/Photos cifs username=adam,password=adam,iocharset=utf8,sec=ntlm 0 0
that method required creating /media/windowsshared file
mount -a passes but navigating to /media/windowsshared shows nothing in there.

/media/windowsshared should be a directory, not a file. Though it might be a typo in your message.
For me mounting from fstab by "mount" command doesn't work as well due to permissions, even if I trying to mount share as root.
So I use my workaround, a little executable script that assigned to hotkey. This is what I have in that script:
Code:

echo "password" | sudo -S mount -t cifs //192.168.1.11/share /mnt/share -o nosuid,nodev,password="password",sec=ntlm,workgroup=WORKGROUP,ip=192.168.1.11
The only way to get it working for me is mounting share with piping password to sudo.
Options "workgroup" and "ip" must be specified too.
May be it will help you.


All times are GMT -5. The time now is 06:36 PM.