Samba share not mounting via fstab. Mounts through command line.

I’m having issues getting a samba share to mount properly through fstab. I can get it to mount fine doing:

sudo mount -t cifs -o guest // /mnt/Sync

However, my fstab options don’t seem to work. Currently, fstab is set to:

//  /mnt/Sync  cifs  guest,uid=1000,iocharset=utf8  0  0

Any advice? I have a feeling I’m doing something stupid. Using the wrong slash or missing a comma somewhere.

Please allways tell which version of openSUSE you are using.

Are you suing a desktop environment? When yes, are you using NetworkManger? When yes, then ptobably your network is not up until a user loged in and connected to a network.

I’m using XFCE. So yes, I’m using a desktop.

Is my only option now to mount it through an autostart script?

Read this post. (It may still be relevant to you):

Ideally, you should tell us your openSUSE version. Things change, so the solution might have as well.

Anyway, further advice here:

Two workarounds discussed for mounts that fail at boot

  1. A small script in after.local used to ‘mount -a’ which runs a little bit later in the boot sequence.
  2. A cron job in the crontable used to ‘mount -a’ after a sufficient delay for the network to be up and running

I’m on Opensuse tumbleweed, upgraded from 13.1.

Since i have other scripts I need to write, I guess I’ll write it in a startup script. Side question, since OpenSuse switched to systemd, is it recommended I create a service out of this or just add mu stuff to /etc/init.d/boot.local ?

If you don’t mind creating a service, then that is probably the correct way from a systemd perspective. I wouldn’t recommend using boot.local, as that is too early in the boot sequence.

This thread may be useful to you as well

You actually mean the file


right? Any ways i haven’t done much of samba auto mounting myself so i might be wrong :).

No, he is referring to /etc/fstab, although either place will work assuming the network is actually up. The cifstab location is just regarded as being more secure if using authentication credentials (which the OP isn’t)

# This file allows you to mount SMB/ CIFS shares during system boot while
# hiding passwords to other people than root.  Use /etc/fstab for public
# available services.  You have to specify at least a service name and a mount
# point.  Current default vfstype is cifs.

Right, sorry for the noise :slight_smile:

I just added it to my custom login script I have which does other things. The share gets mounted now, but i have other issues I’m starting another thread for.

Thanks for the update. I’m sure others will be able to assist you with your other issues.

Then please do so in the Tumbleweed forums and not elsewhere. As we now found out, after we had to ask several times, that you use Tumbleweed.