7

i'm trying to use cifs-utils to get files in another machine. In the other machine i've installed samba. Everything works fine if a try in the same machine (the one with samba) using cifs-util, but it doesn't if i try with another in the intranet. Here's what i've done:

  1. i've installed cifs-util
  2. i've added the following line to the /etc/fstab file:

    //192.168.0.72/Triple_RDF /media/Triple cifs credentials=/home/ubuntu/.smbcredentials,iocharset=utf8,sec=ntlm 0 0
    
  3. i've created the .smbcredentials file typing:

    gedit ~/.smbcredentials
    

    and adding the lines

    username=[username]
    password=[password]
    

    Of course i put my real username and password instead of [username] and [password].

  4. then i changed the permits of the previous file typing:

    chmod 600 ~/.smbcredentials
    

Since i'm using Ubuntu 14.04 it apppears an icon on the nautilius bar (the one on the left side), but when i click on it appens nothing. If i try to go inside of the "Triple" which now appears with my network resources the system says:

mount: only root can mount //192.168.0.72/Triple_RDF on /media/Triple.

I thought that may be it could be a problem of permits in the destination folder, /media/Triple. So i changed those. Here my ls -al output of the /media/Triple folder:

drwxrwxr-x 2 user group 4096

where instead of user and group i put the real ones.

Anybody knows which could be the problem ?

Answer: make sure you have installed cifs-utils and you have user in the fstab entry.

  • 2
    According to OP's answer I am voting to close this as "not reproducible". – guntbert Apr 17 '15 at 20:51
7

Just add users in /etc/fstab like that:

//192.168.0.72/Triple_RDF /media/Triple cifs credentials=/home/ubuntu/.smbcredentials,iocharset=utf8,sec=ntlm,users 0 0

Normally, only the superuser can mount filesystems. However, when fstab contains the user option on a line, anybody can mount the corresponding system.

Or if you want any user to mount/unmount the drives use users instead.

  • Why and what does it do, what you suggest here? Can you please elaborate? Thx – Semo Sep 25 '16 at 6:34
1

I solved the same problem by adding the UID info as an admin user from my Linux machine, so my /etc/fstab line now looks like this:

//192.168.1.X/Multimedia /media/dungeonmultimedia cifs uid=[linuxadminuser],username=[nasadminuser],password=[nasadminpass] 0 0
  • Welcome to Ask Ubuntu! ;-) Could you please review my edits and also review the editing help to improve the readability of your questions in the future... ;-) – Fabby Apr 17 '15 at 19:12
  • You're welcome! 1 upvote = +10 rep! ;-) – Fabby Jan 9 '16 at 12:57
1

Actually the problem was that I hadn't restarted the system, so I had mounted nothing.

Restarting the system or just forcing the mount everything works perfectly. I've just typed:

sudo mount -a
-1

I had the same problem, I put it in /etc/fstab so it mounts automatically on boot.

  • 1
    I recommend expanding this answer (through editing) to explain how to do this, perhaps with an example fstab line based on what you use. – Eliah Kagan Sep 11 '14 at 10:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.