Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 07-22-2008, 11:51 AM   #1
Registered: Oct 2005
Location: India
Distribution: Redhat 7-9,Fedora Core 3 - 9, RHEL 4 -5, CentOS 4 - 5, Ubuntu 7.10 - 12.10, Mandirva 2008 -2009
Posts: 133

Rep: Reputation: 15
Question Mounting windows shares


As a part of mass Linux deployment, I need to mount some windows shares which the users need very frequently. For windows machines, I map network drives and they use seamlessly.

For linux -

I am able to mount the shares by cifs mount and adding them to fstab to make it permanent.

With this the problem occurred is the users were not getting write access to the mounted shares. I fixed it by adding the option rw. For example, my command to mount a share is like this:

mount -t cifs //server/share /folder -o rw,domain=xxx,username=winuser,password=xxx

In this way the users get write access through command line, but when they try to create a file, copy/paste/move a file or folder by Nautilus, it says permission denied. The users are not much familiar with Linux hence they need to do everything via GUI.

Also I noticed, after mounting the share, the user's ownership gets changed to root:root.

Please suggest some way to work this out.....I have got assignment to fix this asap.

Thanks in advance.

Windows? reboot. Linux! be root!!
Old 07-22-2008, 08:04 PM   #2
Senior Member
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
You need to add one or two more parameters to your mount command; uid=<username>,gid=users
Most likely the uid parameter will work without the gid parameter.
Old 07-22-2008, 10:13 PM   #3
Senior Member
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
This seems to work quite well for me where the password is stored in /etc/cifspw file.
I don't know if it works for other users as we have a bunch of win-dummies that would have a cow if made to learn something other than the clicky click.

//winserver/folder /mnt/win cifs uid=fred,credentials=/etc/cifspw,domain=workdomain 0 0
Old 07-24-2008, 02:14 AM   #4
Registered: Oct 2005
Location: India
Distribution: Redhat 7-9,Fedora Core 3 - 9, RHEL 4 -5, CentOS 4 - 5, Ubuntu 7.10 - 12.10, Mandirva 2008 -2009
Posts: 133

Original Poster
Rep: Reputation: 15
Yes! the uid & gid fixed the problem!! Thank you very much.

Windows? reboot. Linux! be root!!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting Windows shares ctkroeker Linux - Networking 2 06-16-2006 05:02 PM
Mounting windows shares... mattbeekler Linux - Software 2 11-24-2003 02:35 PM
Mounting Windows Shares ilumin8d Linux - Networking 4 07-15-2003 03:36 AM
Mounting Windows Shares Thermos Linux - Networking 3 07-09-2003 02:34 PM
mounting windows shares Moebius Linux - Newbie 12 12-19-2002 09:58 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:19 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration