Problem with cifs-util. Mount: only root can mount
Solution 1
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.
Solution 2
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
Solution 3
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
Related videos on Youtube
user2635652
Updated on September 18, 2022Comments
-
user2635652 over 1 year
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:- i've installed cifs-util
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
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].
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 myls -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.
-
guntbert about 9 yearsAccording to OP's answer I am voting to close this as "not reproducible".
-
Eliah Kagan over 9 yearsI recommend expanding this answer (through editing) to explain how to do this, perhaps with an example
fstab
line based on what you use. -
Fabby about 9 yearsWelcome 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 over 8 yearsYou're welcome! 1 upvote = +10 rep! ;-)
-
Semo over 7 yearsWhy and what does it do, what you suggest here? Can you please elaborate? Thx
-
U2ros over 3 yearsThis worked for me when nothing else would. Cheers