Solved

Mount CIFS share on SuSE Linux

Posted on 2012-03-16
9
1,726 Views
Last Modified: 2012-03-17
hi,

I'm trying to mount a windows share (W 2K8) to a server running SuSE Enterprise Linux 11 (kernel version 2.6.27.19-5-pae).

I'm logged in as root and using the command,
# mount -t cifs -o username=domain\username,password=password //WinServer/share /mount/directory

I get the below error,
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

Its the same error even when I use the username@domain format in the command.

Any ideas?

thanks in advance
0
Comment
Question by:Peddu_bhanu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 37729552
Isn't it user=... instead of username=...

And even if it accepts username, don't use a backslash to separate domain and user, use a forward /.
0
 
LVL 1

Author Comment

by:Peddu_bhanu
ID: 37729702
Sorry, I've only used the username thing..

But still the same even when a '/' is used after the domain name.
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 37729813
I meant before the domain name!

Or try this:

mount -t cifs -o username=username,password=password,domain=mydomain //WinServer/share /mount/directory
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 1

Author Comment

by:Peddu_bhanu
ID: 37729905
doesn't work, I still get the same error.
0
 
LVL 11

Accepted Solution

by:
legolasthehansy earned 500 total points
ID: 37730346
Sometimes you can get it to work by putting it in /etc/fstab

//Winserver/share /destination cifs username=blah,password=pass 0 0

Save and exit the /etc/fstab
Run "mount -a"
See if you share is mounted.

We can get to how to secure the password once it is working..
0
 
LVL 1

Author Comment

by:Peddu_bhanu
ID: 37733317
heyy, this works!! But I've modified the fstab entry just a bit to include the below options.

here's what I have done now.
# vi /etc/fstab

//windowsserver/share /mnt/win cifs auto,gid=users,fmask=0664,dmask=0775,iocharset=iso8859-15,credentials=/etc/sambapasswords 0 0
# vi /etc/sambapasswords
username=winntuser
password=mypassword
# chown 0.0 /etc/sambapasswords
# chmod 600 /etc/sambapasswords
# mount -a

Now, I get a couple of warnings just after mount.
WARNING: CIFS mount option 'fmask' is deprecated. Use 'file_mode' instead.
WARNING: CIFS mount option 'dmask' is deprecated. Use 'dir_mode' instead.

Any idea this would impact my file share?
0
 
LVL 1

Author Comment

by:Peddu_bhanu
ID: 37733342
When I change fstab entry like below, I get another set of warnings.
//windowsserver/share /mnt/win cifs auto,gid=users,file_mode=664,dir_mode=775,iocharset=iso8859-15,credentials=/etc/sambapasswords 0 0

WARNING: 'file_mode' not expressed in octal.
WARNING: 'dir_mode' not expressed in octal.
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 37733498
Try

'0664' and '0775'
0
 
LVL 1

Author Comment

by:Peddu_bhanu
ID: 37734112
works now, no errors.

Many thanks for your help.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question