Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I add a folder in /etc/fstab:

// /home/my/test cifs user=afs,pass=123456,auto,exec,umask=002,gid=1000,uid=1000,file_mode=0777,dir_mode=0777 0 0

Now test link can be seen in nautilus sidebar. But when I click on this icon, an error will be displayed:

mount: only root can mount // on /home/my/test

How I can mount this folder from terminal with root user?

share|improve this question
have you tried sudo mount -a – Rahul Patil Dec 27 '12 at 9:11
sudo mount ssh:// /home/my/afs37/‍‍ And result: wrong fs type, bad option, bad superblock on ssh:// – chalist Dec 27 '12 at 10:01
why are you trying via ssh ? in post you have mention cifs. – Rahul Patil Dec 27 '12 at 10:12
mount /home/my/afs37/ >>> result >>> mount: special device does not exist – chalist Dec 27 '12 at 10:26
@chalist Shouldn't it be sudo mount -t cifs // /home/my/afs37/? – Karlson Dec 27 '12 at 16:52

Try adding the user option in your opts at /etc/fstab.

From man 8 mount:

user Allow an ordinary user to mount the filesystem. The name of the mounting user is written to mtab so that he can unmount the filesystem again. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line user,exec,dev,suid).

share|improve this answer

You have more options:

  1. replace user asf and its pass with root and root password, if you have any. Since you are on Ubuntu, it's not trivial.
  2. add rights to user "asf", allow him to mount as root. Create one file in /etc/sudoers.d/ as root, named i.e. asf-mount, and with the following one line content:

    asf ALL=NOPASSWD: /bin/mount

Also change the access rights of this file to read-only: sudo chmod 440 /etc/sudoers.d/asf-mount, and logout and login again with user asf.

share|improve this answer
Don't work dude – chalist Dec 29 '12 at 7:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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