Solved

Mount CIFS share on SuSE Linux

Posted on 2012-03-16
9
1,554 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
  • 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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
An article on effective troubleshooting
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

815 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now