Problem mounting samba shares

Hi

I try to use fstab to mount samba shares on my suse 11.4 at start-up . The shares are on a ReadyNAS. I have this line in fstab:

//nas1/familiefoto /mnt/familiefoto cifs guest,_nedtdev 0 0

When I try to open the /mnt/familiefoto in Dolphin, the sahre is not mounted, but after I use the command ‘sudo mount -a’ I can access the share.

Howe do I get it mounted automatically at start-up?
Thanks,
Bjorn

Since a mount -a works later, it is most likely that the network is not up yet when this command is run. In KDE you could add this command to your after.local file in /etc/init.d as root after a sleep 20 command before and see if that works. I must say that while I do use Samba, I don’t find it necessary to mount such drives. You can just as easily browse the network and find this share. That’s what I do, but I am looking for other PC’s and not a NAS. I just create a URL link on the desktop like smb://workgroup/ that shows all PC shares in the same workgroup name. I have a tutorial on Samba SWAT that you might find interesting here:

Samba S.W.A.T. - Samba Web Administration Tool Setup for openSUSE - Blogs - openSUSE Forums

Thank You,

Here are some things to look at re cifs mounts on a slow network: Samba: HowTo Mount a CIFS Network Share [AKA Map Network Drive] in openSUSE 11 plus FAQs (look for segment titled “A permanent mount fails at boot time”). The tip to use “mount -a” in the file /etc/init.d/after.local should solve the problem.

On Sun January 8 2012 01:26 pm, swerdna wrote:

>
> Here are some things to look at re cifs mounts on a slow network:
> ‘Samba: HowTo Mount a CIFS Network Share [AKA Map Network Drive] in
> openSUSE 11 plus FAQs’
> (http://opensuse.swerdna.org/susesambacifs.html#netbios) (look for
> segment titled “A permanent mount fails at boot time”). The tip to use
> “mount -a” in the file /etc/init.d/after.local should solve the problem.
>
>
bkv1;

You may also want to look at this thread, particularly post #8:
http://forums.opensuse.org/forums/english/get-technical-help-here/install-boot-login/470441-fstab-syntax-mounting-network-cifs-drives.html
It seems to provide a solution for cifs mount. However, I have not tested this
and am still running 11.4.

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

The OP says he is using openSUSE 11.4 and not 12.1 and so a fstab comment that says it is using systemd does not apply I would think.

Thank You,

Just now tested that for a D-link NAS with a guest share. It fails for me, whereas the after.local trick succeeds.

Just now tested that for a D-link NAS with a guest share. It fails for me, whereas the after.local trick succeeds.

So, if we do the following in openSUSE 11.4 it works OK? Edit the after.local file as root:

In KDE do a Alt-F2 and enter:

kdesu kwrite /etc/init.d/after.local

In GNOME do a Alt-F2 and enter:

gnomesu gedit /etc/init.d/after.local

And then add the command:

mount -a

Is that correct and it worked OK in openSUSE 11.4?

Thank You,

IME you don’t need the “sleep 20” line, just the “mount -a” line

IME you don’t need the “sleep 20” line, just the “mount -a” line

And to what sleep 20 command do you refer?lol! Bamm and its gone.

Thank You,

James have you been leaning on the bar in the mod lounge again?

James have you been leaning on the bar in the mod lounge again?

And anywhere the word bar can be used. lol!

Thank You,

On Sun January 8 2012 04:06 pm, jdmcdaniel3 wrote:

>
> venzkep;2428057 Wrote:
<snip>
>
> The OP says he is using openSUSE 11.4 and not 12.1 and so a fstab
> comment that says it is using systemd does not apply I would think.
>
> Thank You,
>
>
James;

You are correct,I missed that simple fact. :frowning:

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

That is OK venzkep as we only ask that you try to help. We all miss little details as I can attest to, that is for sure. Every message you read is another chance to get it right and shine. And learn a little more along the way.

Thank You,

I have a real problem with this one P.V. I have two 12.1 installations on my LAN, and a NAS that mounts in both by using “mount -a” in after.local. If I turn that off in after.local and place the code “comment=systemd.automount” in fstab instead, it does not work in either of the two installationa of 12.1 (whereas mount -a does work). I know that it does work for some people, witness your link, but it seems to be hit and miss.

I have a real problem with this one P.V. I have two 12.1 installations on my LAN, and a NAS that mounts in both by using “mount -a” in after.local. If I turn that off in after.local and place the code “comment=systemd.automount” in fstab instead, it does not work in either of the two installationa of 12.1 (whereas mount -a does work). I know that it does work for some people, witness your link, but it seems to be hit and miss.

I wonder if wired verses wireless networking matters as the latter may take more time as well as other issues.

Thank You,

On Mon January 9 2012 06:06 am, jdmcdaniel3 wrote:

>
>> I have a real problem with this one P.V. I have two 12.1 installations
>> on my LAN, and a NAS that mounts in both by using “mount -a” in
>> after.local. If I turn that off in after.local and place the code
>> “comment=systemd.automount” in fstab instead, it does not work in either
>> of the two installationa of 12.1 (whereas mount -a does work). I know
>> that it does work for some people, witness your link, but it seems to be
>> hit and miss.
>
> I wonder if wired verses wireless networking matters as the latter may
> take more time as well as other issues.
>
> Thank You,
>
Swerdna;

Is there anything in var/log/boot.msg or var/log/messages that might shed any
light on the failure to mount? (As if you didn’t know, I’m grasping at
straws here.)

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

Hi

@ jdmcdaniel3 : Creating smb: links is how I have been doing it so far. I created them in Dolphin. Unfortunately this is not the same as mounting. For instance, LibreOffice cant work on these linked shares.

Yes the after.local worked, but only when I in the fstab entry also added “username=guest,password=”, Furthermore, to get write-privelege I had to enter uid and gid also. I don’t find it ok using gid and uid in fstab on a machine thsat is used by several people.

I do find it complicated to set up a Linux machine as a samba client

-Bjorn