LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-18-2014, 11:01 AM   #1
LJSkow
LQ Newbie
 
Registered: Sep 2014
Posts: 1

Rep: Reputation: Disabled
Mount cifs using credentials file


I am trying to mount a folder from my embedded Linux system to a windows 7 computer. I keep getting Permission Denied when I try using a credentials file.

When I do it from command line as root it works. I type in

Code:
mount -t cifs //[IPAddress]/[Folder Path] /home/[user]/ShareFolder -o username=[Username] -o uid=[user]
when I do it from the fstab folder it works.

Code:
//[IPAdress]/[Folder Path] /home/[user]/ShareFolder cifs user,username=[Username],password=[Password],sec=ntlm,uid=[user],noauto 0 0
but if I switch to using a credentials file it does not work

Code:
//[IPAddress]/[Folder Path] /home/[user]/ShareFolder cifs user,credentials=/home/[user]/smbcredentials,user,sec=ntlm,uid=[user],noauto 0 0
the credentials file is

Code:
username=[username]
password=[password]
I have tried it with domain, and that didn't work. I turned on verbose to see what the difference was between the working fstab and the non-working fstab with credentials file.

working:

Code:
mount.cifs kernel mount options: ip=[IPAddress],unc=\[IPAddress]..., sec=ntlm,noauto,uid=500,gid=500,user=[WINDOWS USERNAME],prefixpath=[path to folder],pass=*
non-working:

Code:
mount.cifs kernel mount options: ip=[IPAddress],unc=\[IPAddress]..., sec=ntlm,noauto,uid=500,gid=500,user=[LINUX USERNAME],prefixpath=[path to folder],pass=*
the difference is that the working one uses the windows username as user and the non-working one uses the linux username. I'm not sure how to fix this. I did once add the domain to the credentials file, and that appeared correctly in the verbose line.
 
Old 09-18-2014, 11:34 AM   #2
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
A cifs mount is looking for the necessary windows credentials. The windows machine doesn't understand linux uid/gid's
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] autofs, fstab and manual cifs mounts fail if using credentials file carltm Red Hat 1 12-02-2009 06:39 AM
mount.cifs credentials=/path-to-passwd-file not parsing xxx_anuj_xxx Linux - Server 1 11-10-2009 03:44 AM
Mounting windows share via cifs (fstab entry) - error 13 opening credentials file O(V)eGA_l2el) Linux - Networking 2 12-05-2006 11:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration