?
Solved

Mount CIFS share on SuSE Linux

Posted on 2012-03-16
9
Medium Priority
?
1,919 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
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
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 2000 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

Optimum High-Definition Video Viewing and Control

The ATEN VM0404HA 4x4 4K HDMI Matrix Switch supports 4K resolutions of UHD (3840 x 2160) and DCI (4096 x 2160) with refresh rates of 30 Hz (4:4:4) and 60 Hz (4:2:0). It is ideal for applications where the routing of 4K digital signals is required.

Question has a verified solution.

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

Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

777 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