/etc/mtab is bad when mounting a cifs share The 2019 Stack Overflow Developer Survey Results Are InAuto-Mounting CIFS Shares on LaptopRHEL 7: mount windows cifs share failed“ls -lh” directories reported size : Linux vs CIFS mounted drivesIs it possible to create a NFS Share from a CIFS mounted directory?Mounting a CIFS share respecting the mode but ignoring the UID/GIDCifs (samba) Share permission issue (unix + zfs)Cifs share mount on a VPS without cifs module build in kernelAutoFS fails to mount Samba CIFS sharemounting CIFS - works on Ubuntu 14, not on Debian TestingPermission denied on files in a directory on a CIFS-mounted Windows share in Linux

How technical should a Scrum Master be to effectively remove impediments?

Time travel alters history but people keep saying nothing's changed

How can I autofill dates in Excel excluding Sunday?

Can a rogue use sneak attack with weapons that have the thrown property even if they are not thrown?

Why hard-Brexiteers don't insist on a hard border to prevent illegal immigration after Brexit?

Am I thawing this London Broil safely?

Is a "Democratic" Oligarchy-Style System Possible?

Where to refill my bottle in India?

Can a flute soloist sit?

Aging parents with no investments

How to type this arrow in math mode?

Building a conditional check constraint

What are the motivations for publishing new editions of an existing textbook, beyond new discoveries in a field?

Why is the maximum length of OpenWrt’s root password 8 characters?

Write faster on AT24C32

Loose spokes after only a few rides

Multiply Two Integer Polynomials

Worn-tile Scrabble

Do these rules for Critical Successes and Critical Failures seem Fair?

Earliest use of the term "Galois extension"?

Is there a symbol for a right arrow with a square in the middle?

Is bread bad for ducks?

What is the closest word meaning "respect for time / mindful"

FPGA - DIY Programming



/etc/mtab is bad when mounting a cifs share



The 2019 Stack Overflow Developer Survey Results Are InAuto-Mounting CIFS Shares on LaptopRHEL 7: mount windows cifs share failed“ls -lh” directories reported size : Linux vs CIFS mounted drivesIs it possible to create a NFS Share from a CIFS mounted directory?Mounting a CIFS share respecting the mode but ignoring the UID/GIDCifs (samba) Share permission issue (unix + zfs)Cifs share mount on a VPS without cifs module build in kernelAutoFS fails to mount Samba CIFS sharemounting CIFS - works on Ubuntu 14, not on Debian TestingPermission denied on files in a directory on a CIFS-mounted Windows share in Linux



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















On a Linux system, I used the following command to mount a Windows Share folder:



mount.cifs -o user=xxxx,pass=xxxx '//host/folder' /mnt 


Above command finished without giving any errors or output at all. I could see files in /mnt, which means the mount was successful. Then I ran command mount, and the 1st line of the output says:



[mntent]: line 14 in /etc/mtab is bad 


And the share folder I just mounted doesn't appear in the output.



Then I checked the content of /etc/mtab and found that there are a whole lot of options for the just mounted share. like this:
enter image description here



While on another Linux Machine running the same OS(SLE 11SP3), I did the exact same thing(but using a different share on a different Windows machine), but the content in /etc/mtab is very simple, like this(and mount shows the mounted share correctly and doesn't say mtab is bad):



//server/folder /mnt cifs rw 0 0 


So the question is, on the 1st machine:

1. why are there so many option for this windows share in /etc/mtab?

2. why does the mount command say "mtab is bad"?










share|improve this question
























  • No idea why the same mount on identical OSs would give different mtab entries, but it looks like in the first case mount is complaining because the blank in the folder name is making it miscount the fields on that line.

    – Mark Plotnick
    Apr 27 '16 at 7:17











  • Thanks for comment. the black in the folder name appears in option unc=\xxxxxx. I definitely didn't specify such an option, no idea why it's there. In the 1st field of line 14 of mtab, the blank is replaced by 40.

    – David Dai
    Apr 27 '16 at 7:21











  • that image is unreadable due to tiny tiny fonts. please don't post images, copy and paste the text.

    – cas
    Apr 27 '16 at 8:22











  • Is there an entry in /etc/fstab that also mounts /mnt or something under it?

    – Mark Plotnick
    Apr 27 '16 at 17:11

















1















On a Linux system, I used the following command to mount a Windows Share folder:



mount.cifs -o user=xxxx,pass=xxxx '//host/folder' /mnt 


Above command finished without giving any errors or output at all. I could see files in /mnt, which means the mount was successful. Then I ran command mount, and the 1st line of the output says:



[mntent]: line 14 in /etc/mtab is bad 


And the share folder I just mounted doesn't appear in the output.



Then I checked the content of /etc/mtab and found that there are a whole lot of options for the just mounted share. like this:
enter image description here



While on another Linux Machine running the same OS(SLE 11SP3), I did the exact same thing(but using a different share on a different Windows machine), but the content in /etc/mtab is very simple, like this(and mount shows the mounted share correctly and doesn't say mtab is bad):



//server/folder /mnt cifs rw 0 0 


So the question is, on the 1st machine:

1. why are there so many option for this windows share in /etc/mtab?

2. why does the mount command say "mtab is bad"?










share|improve this question
























  • No idea why the same mount on identical OSs would give different mtab entries, but it looks like in the first case mount is complaining because the blank in the folder name is making it miscount the fields on that line.

    – Mark Plotnick
    Apr 27 '16 at 7:17











  • Thanks for comment. the black in the folder name appears in option unc=\xxxxxx. I definitely didn't specify such an option, no idea why it's there. In the 1st field of line 14 of mtab, the blank is replaced by 40.

    – David Dai
    Apr 27 '16 at 7:21











  • that image is unreadable due to tiny tiny fonts. please don't post images, copy and paste the text.

    – cas
    Apr 27 '16 at 8:22











  • Is there an entry in /etc/fstab that also mounts /mnt or something under it?

    – Mark Plotnick
    Apr 27 '16 at 17:11













1












1








1








On a Linux system, I used the following command to mount a Windows Share folder:



mount.cifs -o user=xxxx,pass=xxxx '//host/folder' /mnt 


Above command finished without giving any errors or output at all. I could see files in /mnt, which means the mount was successful. Then I ran command mount, and the 1st line of the output says:



[mntent]: line 14 in /etc/mtab is bad 


And the share folder I just mounted doesn't appear in the output.



Then I checked the content of /etc/mtab and found that there are a whole lot of options for the just mounted share. like this:
enter image description here



While on another Linux Machine running the same OS(SLE 11SP3), I did the exact same thing(but using a different share on a different Windows machine), but the content in /etc/mtab is very simple, like this(and mount shows the mounted share correctly and doesn't say mtab is bad):



//server/folder /mnt cifs rw 0 0 


So the question is, on the 1st machine:

1. why are there so many option for this windows share in /etc/mtab?

2. why does the mount command say "mtab is bad"?










share|improve this question
















On a Linux system, I used the following command to mount a Windows Share folder:



mount.cifs -o user=xxxx,pass=xxxx '//host/folder' /mnt 


Above command finished without giving any errors or output at all. I could see files in /mnt, which means the mount was successful. Then I ran command mount, and the 1st line of the output says:



[mntent]: line 14 in /etc/mtab is bad 


And the share folder I just mounted doesn't appear in the output.



Then I checked the content of /etc/mtab and found that there are a whole lot of options for the just mounted share. like this:
enter image description here



While on another Linux Machine running the same OS(SLE 11SP3), I did the exact same thing(but using a different share on a different Windows machine), but the content in /etc/mtab is very simple, like this(and mount shows the mounted share correctly and doesn't say mtab is bad):



//server/folder /mnt cifs rw 0 0 


So the question is, on the 1st machine:

1. why are there so many option for this windows share in /etc/mtab?

2. why does the mount command say "mtab is bad"?







mount cifs






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 27 '16 at 7:26







David Dai

















asked Apr 27 '16 at 6:51









David DaiDavid Dai

1,68221326




1,68221326












  • No idea why the same mount on identical OSs would give different mtab entries, but it looks like in the first case mount is complaining because the blank in the folder name is making it miscount the fields on that line.

    – Mark Plotnick
    Apr 27 '16 at 7:17











  • Thanks for comment. the black in the folder name appears in option unc=\xxxxxx. I definitely didn't specify such an option, no idea why it's there. In the 1st field of line 14 of mtab, the blank is replaced by 40.

    – David Dai
    Apr 27 '16 at 7:21











  • that image is unreadable due to tiny tiny fonts. please don't post images, copy and paste the text.

    – cas
    Apr 27 '16 at 8:22











  • Is there an entry in /etc/fstab that also mounts /mnt or something under it?

    – Mark Plotnick
    Apr 27 '16 at 17:11

















  • No idea why the same mount on identical OSs would give different mtab entries, but it looks like in the first case mount is complaining because the blank in the folder name is making it miscount the fields on that line.

    – Mark Plotnick
    Apr 27 '16 at 7:17











  • Thanks for comment. the black in the folder name appears in option unc=\xxxxxx. I definitely didn't specify such an option, no idea why it's there. In the 1st field of line 14 of mtab, the blank is replaced by 40.

    – David Dai
    Apr 27 '16 at 7:21











  • that image is unreadable due to tiny tiny fonts. please don't post images, copy and paste the text.

    – cas
    Apr 27 '16 at 8:22











  • Is there an entry in /etc/fstab that also mounts /mnt or something under it?

    – Mark Plotnick
    Apr 27 '16 at 17:11
















No idea why the same mount on identical OSs would give different mtab entries, but it looks like in the first case mount is complaining because the blank in the folder name is making it miscount the fields on that line.

– Mark Plotnick
Apr 27 '16 at 7:17





No idea why the same mount on identical OSs would give different mtab entries, but it looks like in the first case mount is complaining because the blank in the folder name is making it miscount the fields on that line.

– Mark Plotnick
Apr 27 '16 at 7:17













Thanks for comment. the black in the folder name appears in option unc=\xxxxxx. I definitely didn't specify such an option, no idea why it's there. In the 1st field of line 14 of mtab, the blank is replaced by 40.

– David Dai
Apr 27 '16 at 7:21





Thanks for comment. the black in the folder name appears in option unc=\xxxxxx. I definitely didn't specify such an option, no idea why it's there. In the 1st field of line 14 of mtab, the blank is replaced by 40.

– David Dai
Apr 27 '16 at 7:21













that image is unreadable due to tiny tiny fonts. please don't post images, copy and paste the text.

– cas
Apr 27 '16 at 8:22





that image is unreadable due to tiny tiny fonts. please don't post images, copy and paste the text.

– cas
Apr 27 '16 at 8:22













Is there an entry in /etc/fstab that also mounts /mnt or something under it?

– Mark Plotnick
Apr 27 '16 at 17:11





Is there an entry in /etc/fstab that also mounts /mnt or something under it?

– Mark Plotnick
Apr 27 '16 at 17:11










1 Answer
1






active

oldest

votes


















0














Someone added a lot of option for that share or that entry was created automatically. It is saying "mtab is bad" because one or some of the options is not correct.

For instance, the option unc=\...abc abc contains a space character, you should quote that value. Options are separated by comma, a space in one of the values will end the "options" field.

You can try to replace that line from mtab with just :



//server/folder /mnt cifs rw,user=xxxx,pass=xxxx 0 0





share|improve this answer

























  • Someone added a lot of option for that share., how? mtab in generated by the system on the fly, not sure If it should be manually edited but my guess is NO.

    – David Dai
    Apr 27 '16 at 7:22












Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f279382%2fetc-mtab-is-bad-when-mounting-a-cifs-share%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Someone added a lot of option for that share or that entry was created automatically. It is saying "mtab is bad" because one or some of the options is not correct.

For instance, the option unc=\...abc abc contains a space character, you should quote that value. Options are separated by comma, a space in one of the values will end the "options" field.

You can try to replace that line from mtab with just :



//server/folder /mnt cifs rw,user=xxxx,pass=xxxx 0 0





share|improve this answer

























  • Someone added a lot of option for that share., how? mtab in generated by the system on the fly, not sure If it should be manually edited but my guess is NO.

    – David Dai
    Apr 27 '16 at 7:22
















0














Someone added a lot of option for that share or that entry was created automatically. It is saying "mtab is bad" because one or some of the options is not correct.

For instance, the option unc=\...abc abc contains a space character, you should quote that value. Options are separated by comma, a space in one of the values will end the "options" field.

You can try to replace that line from mtab with just :



//server/folder /mnt cifs rw,user=xxxx,pass=xxxx 0 0





share|improve this answer

























  • Someone added a lot of option for that share., how? mtab in generated by the system on the fly, not sure If it should be manually edited but my guess is NO.

    – David Dai
    Apr 27 '16 at 7:22














0












0








0







Someone added a lot of option for that share or that entry was created automatically. It is saying "mtab is bad" because one or some of the options is not correct.

For instance, the option unc=\...abc abc contains a space character, you should quote that value. Options are separated by comma, a space in one of the values will end the "options" field.

You can try to replace that line from mtab with just :



//server/folder /mnt cifs rw,user=xxxx,pass=xxxx 0 0





share|improve this answer















Someone added a lot of option for that share or that entry was created automatically. It is saying "mtab is bad" because one or some of the options is not correct.

For instance, the option unc=\...abc abc contains a space character, you should quote that value. Options are separated by comma, a space in one of the values will end the "options" field.

You can try to replace that line from mtab with just :



//server/folder /mnt cifs rw,user=xxxx,pass=xxxx 0 0






share|improve this answer














share|improve this answer



share|improve this answer








edited Apr 27 '16 at 8:39

























answered Apr 27 '16 at 7:21









mazsmazs

2,6201623




2,6201623












  • Someone added a lot of option for that share., how? mtab in generated by the system on the fly, not sure If it should be manually edited but my guess is NO.

    – David Dai
    Apr 27 '16 at 7:22


















  • Someone added a lot of option for that share., how? mtab in generated by the system on the fly, not sure If it should be manually edited but my guess is NO.

    – David Dai
    Apr 27 '16 at 7:22

















Someone added a lot of option for that share., how? mtab in generated by the system on the fly, not sure If it should be manually edited but my guess is NO.

– David Dai
Apr 27 '16 at 7:22






Someone added a lot of option for that share., how? mtab in generated by the system on the fly, not sure If it should be manually edited but my guess is NO.

– David Dai
Apr 27 '16 at 7:22


















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f279382%2fetc-mtab-is-bad-when-mounting-a-cifs-share%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown