LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Mounting windows shares (http://www.linuxquestions.org/questions/linux-general-1/mounting-windows-shares-657451/)

dipuasks 07-22-2008 11:51 AM

Mounting windows shares
 
Hi,

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.

-----Dipu
----------------------------
Windows? reboot. Linux! be root!!

http://www.smartdipu.info

stress_junkie 07-22-2008 08:04 PM

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.

homey 07-22-2008 10:13 PM

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.

Code:

//winserver/folder /mnt/win cifs uid=fred,credentials=/etc/cifspw,domain=workdomain 0 0

dipuasks 07-24-2008 02:14 AM

Yes! the uid & gid fixed the problem!! Thank you very much.

--Dipu
----------------------------
Windows? reboot. Linux! be root!!

http://www.smartdipu.info


All times are GMT -5. The time now is 01:00 AM.