This question already has an answer here:

Context: I want to enable a normal user to mount a certain cifs mount on his system (Debian Strech). I therefore added the following entry in /etc/fstab (note the added ,user in the options):

//server/share/ /home/user/mountpoint cifs defaults,user,uid=user,credentials=/home/user/.cifs-creds 0 0

Also the credential-file is owned by the user and is readable/writable/executable (700).

Subsequently mounting as root works (i.e. cifs-utils are available on the system, the credential-file exists and is correctly populated)! But mounting as a user does not, resulting in the following output:

user@system: ~$ mount mountpoint
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

/var/log/kern.log states:

Jun  4 11:36:52 system kernel: [173283.233509] CIFS: Unknown mount option "defaults"

So, somehow, when executed as a user, the defaults option can not be used to mount? When the ,defaults option is removed from the fstab entry, users can mount (without error) but that would leave out a lot defaults (and using the defaults (other than: ,user) should be possible right?).

Hence my question:

  • What is the advised fstab entry to have users mount a CIFS/SAMBA share to prevent the mount error(22): Invalid argument caused by the CIFS: Unknown mount option "defaults"?

Should I simply leave out ,defaults or is there another method to do this (I tried Googling on this, but every tutorial / explanation I find seems to confirm the method used)?

marked as duplicate by sourcejedi, Satō Katsura, Community Jun 4 '17 at 14:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


The manual page describes defaults as refering to the defaults used for axes like ro/rw, suid/nosuid, when a value is not specified explicitly.

But the reason for using defaults, is when you don't have any option you want to explicitly specify. You still need some value to put in the options field, so that you can put something in the next field.

Therefore ,defaults should never be necessary.

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