chuckcintron wrote:
> I have a linkstation on my home network. Shared folder called
> “linux_backup” with no userid or password required.
>
> In OpenSUSE 10.2 if I go to ‘my computer’ and surf to the network
> drives, I see this folder with no problem and I can open it and add
> files:
>
> SMB://LINKSTATION/LINUX_BACKUP
>
> If I use the mount command, I can mount this network drive and use
> it, with no problem.
>
> However, if I add the following to fstab:
>
> //192.68.1.15/LINUX_BACKUP /HOME/CHUCK/BACKUP CIFS
> USERNAME=,PASSWORD=,_NETDEV,UID=CHUCK,GID=USERS 0 0
>
> when I go to open the folder I get the message “permission denied”.
You’re not supposed to put that into /etc/fstab, but
/etc/samba/smbfstab. It has a slightly different format regaring the
zeros at the end. Read the comments on the top.
Note that GNU/Linux is case sensitive, so the above in capitals may
simply not work syntactically.
Finally, openSUSE 10.2 is out of support, you need to upgrade now.
I stopped then restarted the smb service, and was happy to see a return code of zero with an indication that it did process that new line in smbfstab. But then I went to the console to try to find my new /linux_backup directory – and I can’t find it anywhere.
So, if I got a zero return code from smb does that mean it worked? And if it did work, how do I now access the directory?
Knurpht, I did try your syntax as well…it did map the directory but I get the same “permission denied” error as my own attempt with fstab.
Problem solved. I messed around with a couple of things, so I’m not sure exactly what did it. One thing for sure, I didn’t realize that the target directory for the map has to exist already on the linux machine.
also, it seems like it wants to have a carriage return after the last line in fstab, so make sure you hit enter after those two zeros.
Anyway, it works great now…survives mounting between reboots and my Linkstation is now a virtual folder for backing up my Linux box (which will now be the next exercise to figure out).
BTW, this is a ubuntu page but it was very helpful:
swerdna wrote:
> AndreasStieger;1962263 Wrote:
>> You’re not supposed to put that into /etc/fstab, but
>> /etc/samba/smbfstab. It has a slightly different format regaring the
>> zeros at the end. Read the comments on the top.
>
> It’s OK to use the cifs filesystem to mount/map a widows share using
> fstab.
> Of course, it’s OK to use smbfstab too.
> 10.2 supports cifs mounts.
fstab is world readable while /etc/samba/smbfstab is not, hence any cifs
mounts with username/password have no business in /etc/fstab. And none
of the others either so users don’t build a habit.
Andreas, this is a guest-accessed share. It’s OK to use fstab for that because the creds are simply to use the option “password=”
So in summary:
It’s OK to put a cifs mount in fstab if you do one of three things (IIRC):
use the “credentials” option and place the creds in a file that has been chmod-ed to 600 [like the file smbfstab is chmoded to 600 in later versions of openSUSE].
chmod 600 the fstab file
use “password=” for guest-accessed shares like the one discussed here