Mounting Network Drives

Hi

Hope you guys can help! I have several NAS drives, one of them contains my music/video library.

What I want is a solution to mounting the drive (samba share) when I boot in to suse 13.1 thus allowing me to start the music library progs ie Clementine without having to mount the drive (then the prog) I have tried SMB4K and the log in is lengthy and I get K Wallet errors and the latest version will not install.

There is also a script for : S.A.C.T. - Samba Automated Configuration Tool - Version 1.20 and was wondering if any one has used it?
Overall I just want to mount the drive,
All advice and help is appreciated in advance

Steve

???
Which openSUSE version do you have, and where are you trying to install it from?

There is also a script for : S.A.C.T. - Samba Automated Configuration Tool - Version 1.20 and was wondering if any one has used it?

AFAIR this is for configuring a Samba Server, not for mounting shares. But I haven’t checked.

Overall I just want to mount the drive,

Well, I guess the best thing in your situation would be to add an entry to /etc/fstab.
It will then be mounted at boot. Of course the network connection has to be available already at that time.
So if your using wireless with NetworkManager, you should set it up as system-connection.

Something like this should do:

//HOST/SHARE   /mnt      cifs        user=xxx,passwd=xxx,nofail,_netdev     0 0

You can/should use a different mount point of course, /mnt is just an example.
And you might not have to specify user and passwd, but if you do you should put the actual values there instead of “xxx”.
“nofail” is there that your system boots even when the share is not reachable, _netdev is important to tell the system that this mount needs a network connection (otherwise it may be mounted too early).

Thanks for the reply Wolfi

I am running 13.1 and thanks for you clear and quick response.
Could you help me make an entry in fstab the details of the NAS are:
IP - 192.168.1.10
NAS NAME - Nasbox
Shared folder - NAS-SHARE

Thanks again Wolfi

So you don’t need a username/password?
Then this should work:

//192.168.1.10/NAS-SHARE   /mnt      cifs        nofail,_netdev     0 0

(you could of course also specify the name instead of the IP address)

And again, replace /mnt with the folder where you want the share to appear on your system. You have to create this folder first if it doesn’t exist.

Wolfi

At the risk of being a pest but I created a folder named NAS in my home folder and I get an error
‘An error occurred while accessing ‘Home’, the system responded: mount: only root can mount //192.168.1.10/NAS-Share on /NAS’
Any suggestion
Thanks again Wolfi
Steve

First, /NAS is NOT in your home folder.

Second, you have to be root to mount filesystems, so use “sudo”. It will get mounted on boot automatically anyway (if nothing is wrong of course).
Or add “user” to the mount options, to be able to mount it as a standard user:

//192.168.1.10/NAS-SHARE   /home/xxx/NAS      cifs        user,nofail,_netdev     0 0

But where does that “Home” come from in your error message?
Could you please post the line you added?

Hi Wolfi

In answer to you question and suggestion, this is what I put in the fstab

//192.168.1.10/NAS-SHARE /NAS cifs user,nofail,_netdev 0 0

This is the error I now get

‘An error occurred while accessing ‘NAS-SHARE on 192.168.1.10’, the system responded: This program is not installed setuid root - “user” CIFS mounts not supported’

I do not log in as root just as the user I created when I installed.

What am I doing wrong???

Many thanks

Nothing.
But for a user to be able to mount shares, /sbin/mount.cifs would need to have the suid root bit set, which it hasn’t for security reasons (I guess).
I forgot about that, sorry.

So just use “sudo mount /192.168.1.10/NAS-SHARE” and it should work.

Btw, if you want to mount them manually, you don’t have to create an entry in /etc/fstab. That’s mainly for mounting automatically on boot.
Just run something like:

sudo mount /192.168.1.10/NAS-SHARE /NAS

You could make mounting as user work by running:

sudo chmod +s /sbin/mount.cifs

But for user mounts you have to have an entry in /etc/fstab.

Forgot to add, in this case you would have to use “mount /NAS” then, though.
It wouldn’t work with specifying the share name.

Hi Wolfi

After a bit of searching around here’s what I tried in fstab

//192.168.1.7/NAS-Share /home/NAS cifs users,_netdev 0 0

And it now mounts on boot and is displayed under Dolphins Devices.

The one problem Wolfi, is that when I access NAS-Share under devices the files are read only.

In contrast when I access the the NAS files through Network/Samba Shares they are read/write.

I have tried to replace ‘guest’ with user/password but still the same.

One more thing, there is a small dialogue box asking me for root pass, I mention it because it has only happened since re-editing fstab
and I have autologin on.

Thanks again so far for your help

OK, but IMHO you should really add the “nofail” option as well.
Otherwise your system won’t boot when the share is not available, f.e. when it is turned off, when there’s no network connection,…

The one problem Wolfi, is that when I access NAS-Share under devices the files are read only.

In contrast when I access the the NAS files through Network/Samba Shares they are read/write.

Well, I guess they are not really read-only, but only writeable as root, because it’s root who mounts the share.
Please post the output of this to confirm:

ls -la /home/NAS

You could use the “uid” option f.e. to make the files/directories owned by a specific user. Or use “fmask”/“dmask” or “umask” to specify the permissions.
I.e. this would make everything read/writeable for all users:

//192.168.1.7/NAS-Share /home/NAS cifs users,_netdev,nofail,umask=0 0 0

One more thing, there is a small dialogue box asking me for root pass, I mention it because it has only happened since re-editing fstab
and I have autologin on.

Where is that box, and when does it appear? During boot?
Maybe the system is asking you for the share’s password.
Try to add the “guest” option.

//192.168.1.7/NAS-Share /home/NAS cifs users,_netdev,nofail,umask=0,guest 0 0