Link to home
Start Free TrialLog in
Avatar of Peddu_bhanu
Peddu_bhanu

asked on

Mount CIFS share on SuSE Linux

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
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

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 /.
Avatar of Peddu_bhanu
Peddu_bhanu

ASKER

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
doesn't work, I still get the same error.
ASKER CERTIFIED SOLUTION
Avatar of legolasthehansy
legolasthehansy

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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?
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.
Try

'0664' and '0775'
works now, no errors.

Many thanks for your help.