Please note that LinuxExchange will be shutting down on December 31st, 2016. Visit this thread for additional information and to provide feedback.

I'm trying to use files from Windows box in Linux.

If I use mount -t cifs username=xyz, password=Abc.DF,... ==> mount success

If I put a line in /etc/fstab

//Windows/share/c /WinShare username=xyz,password=Abc.DF,.... ==> mount success

When putting credentials parameter in /etc/fstab

//Windows/share/c /WinShare credentials=/root/.passwdfile .....

/root/.passwdfile has two lines :

username=xyz
password=Abc.DF

got

**mount error 13 = Permission denied**

putting Quotation marks around password=Abc.DF

after

mount /WinShare

got prompt

Password :

and by typing Abc.DF ==> success

Security policy in Windows box is requiring dot(.) in pasword string.

Any Idea ???

asked 07 Jun '10, 11:16

Franjo124's gravatar image

Franjo124
112
accept rate: 0%

edited 07 Jun '10, 15:49

jeremy's gravatar image

jeremy ♦♦
1.0k1516

Could you please use some backticks (`) to format inline code and 4 whitespaces in front of a line for block code? This would make your post much more readable.

(07 Jun '10, 12:36) guerda

Thanks jeremy! :)

(07 Jun '10, 16:31) guerda

Please accept an answer so the question/answer can be finished. Or provide more details so we can help.

(20 Apr '11, 14:22) rfelsburg ♦



You cannot use the credentials file for passwords containing special characters like "." or ",".

Note that a password which contains the delimiter character (i.e. a comma ',') will fail to be parsed correctly on the command line. However, the same password defined in the PASSWD environment variable or via a credentials file (see below) will be read correctly.

Source: Manpage mount(8)

A solution would be to set up an environment variable for this share. The mount command will use this password and special characters are allowed.

I haven't read of escaping special characters in the credentials file.

I found a bug entry for your issue, propably, you would like to participate or get notified:
Cannot mount CIFS share if password contains non-ASCII character

There are several posts on the mailing list about this topic: List linux-cifs-client "password credentials file"

link

answered 07 Jun '10, 12:43

guerda's gravatar image

guerda
5533515
accept rate: 38%

edited 07 Jun '10, 13:24

Do you mean storing the password in an environment variable?

If so that is an incredibly insecure method of doing it, since anyone can then see the env variable.

(13 Jul '10, 19:22) rfelsburg ♦

rfelsburg: Yes, it would be insecure, but the manpage of MOUNT recommends it. I don't know if it's possible to restrict the ENV variables.

(14 Jul '10, 07:34) guerda

guerda's answer is quoting text that says the exact opposite. It should be okay to have special characters in the credentials file, it is on the command line that they cannot be parsed.

link

answered 09 Dec '10, 11:05

unwind's gravatar image

unwind
1
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×2
×2

Asked: 07 Jun '10, 11:16

Seen: 8,987 times

Last updated: 20 Apr '11, 14:22

powered by OSQA