Mount CIFS share on SuSE Linux


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

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 ( mount.cifs)

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

Any ideas?

thanks in advance
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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 /.
Peddu_bhanuAuthor Commented:
Sorry, I've only used the username thing..

But still the same even when a '/' is used after the domain name.
I meant before the domain name!

Or try this:

mount -t cifs -o username=username,password=password,domain=mydomain //WinServer/share /mount/directory
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Peddu_bhanuAuthor Commented:
doesn't work, I still get the same error.
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..

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Peddu_bhanuAuthor Commented:
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
# 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?
Peddu_bhanuAuthor Commented:
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.

'0664' and '0775'
Peddu_bhanuAuthor Commented:
works now, no errors.

Many thanks for your help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.