Solved

Mount CIFS share on SuSE Linux

Posted on 2012-03-16
9
1,473 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
 
LVL 1

Author Comment

by:Peddu_bhanu
ID: 37729905
doesn't work, I still get the same error.
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
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…

743 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

14 Experts available now in Live!

Get 1:1 Help Now