How to mount a cifs share as user?
I need to mount some samba share with the cifs module as user. The mount.cifs manual says I have to set it setuid root in order to let users mount shares. I have done that but I keep getting "permission denied" errors. I am using Suse 9.1 but with samba-3.0.15pre2-0.1 rpm installed via apt. The server is a Samba 3.0.10. Praise
:
I need to mount some samba share with the cifs module as user. The mount.cifs manual says I have to set it setuid root in order to let users mount shares. I have done that but I keep getting "permission denied" errors. I am using Suse 9.1 but with samba-3.0.15pre2-0.1 rpm installed via apt. The server is a Samba 3.0.10.
Can you mount as root, but use the uid= and gid= options to solve your problem. For example I mount some cifs shares from a Windows 2003 server (also works for a samba server0 by putting the following lines in the /etc/samba/smbfstab files //192.168.1.1/Pubdata /home/mikecoan/WinServer/Pubdata cifs username=mikecoan,password=password,uid-mikecoan,gid=users. This makes me the owner and the group equal to users. You can do this from the command line as well if you su to root. mount -t cifs //192.168.1.1/Pubdata /home/mikecoan/WinServer/Pubdata -o user=mikecoan,uid=mikecoan,gid=users. It will prompt for the password. Note that I am using SuSE 9.3. There were some difficulties mounting windows 2003 shares before the 2.6.10 kernel, but since you refer to a Samba share you should be okay. Mike -- Michael A. Coan Woodlawn Foundation 524 North Avenue, Suite 203 New Rochelle, NY 10801-3410 Tel 914-632-3778 Fax 914-632-5502
On Thursday 19 May 2005 19:35, Mike Coan wrote:
I need to mount some samba share with the cifs module as user. The mount.cifs manual says I have to set it setuid root in order to let users mount shares. I have done that but I keep getting "permission denied" errors. I am using Suse 9.1 but with samba-3.0.15pre2-0.1 rpm installed via apt. The server is a Samba 3.0.10.
Can you mount as root, but use the uid= and gid= options to solve your problem. For example I mount some cifs shares from a Windows 2003 server (also works for a samba server0 by putting the following lines in the /etc/samba/smbfstab files
//192.168.1.1/Pubdata /home/mikecoan/WinServer/Pubdata cifs username=mikecoan,password=password,uid-mikecoan,gid=users.
This makes me the owner and the group equal to users.
You can do this from the command line as well if you su to root.
mount -t cifs //192.168.1.1/Pubdata /home/mikecoan/WinServer/Pubdata -o user=mikecoan,uid=mikecoan,gid=users.
It will prompt for the password.
Note that I am using SuSE 9.3. There were some difficulties mounting windows 2003 shares before the 2.6.10 kernel, but since you refer to a Samba share you should be okay.
Mike
You guys seem smarter than me ! When I try cifs it doesn't work even from the fstab file, so I still use snbfs. When do you use cifs? is it an ntfs thing?
-- Michael A. Coan Woodlawn Foundation 524 North Avenue, Suite 203 New Rochelle, NY 10801-3410 Tel 914-632-3778 Fax 914-632-5502
-- Chadley Wilson Redhat Certified Technician Cert Number: 603004708291270 Pinnacle Micro Manufacturers of Proline Computers ==================================== Exercise freedom, Use LINUX =====================================
Alle 20:49, giovedì 19 maggio 2005, Chadley Wilson ha scritto:
On Thursday 19 May 2005 19:35, Mike Coan wrote:
I need to mount some samba share with the cifs module as user. The mount.cifs manual says I have to set it setuid root in order to let users mount shares. I have done that but I keep getting "permission denied" errors. I am using Suse 9.1 but with samba-3.0.15pre2-0.1 rpm installed via apt. The server is a Samba 3.0.10.
Can you mount as root, but use the uid= and gid= options to solve your problem. For example I mount some cifs shares from a Windows 2003 server (also works for a samba server0 by putting the following lines in the /etc/samba/smbfstab files
//192.168.1.1/Pubdata /home/mikecoan/WinServer/Pubdata cifs username=mikecoan,password=password,uid-mikecoan,gid=users.
This makes me the owner and the group equal to users.
You can do this from the command line as well if you su to root.
mount -t cifs //192.168.1.1/Pubdata /home/mikecoan/WinServer/Pubdata -o user=mikecoan,uid=mikecoan,gid=users.
It will prompt for the password.
Note that I am using SuSE 9.3. There were some difficulties mounting windows 2003 shares before the 2.6.10 kernel, but since you refer to a Samba share you should be okay.
Mike
You guys seem smarter than me ! When I try cifs it doesn't work even from the fstab file, so I still use snbfs. When do you use cifs? is it an ntfs thing?
I am trying to use cifs because smbfs reports incorrect disk usage in some situations. For example I had to see the usage of a quite complex dir tree. df returned 22Terabytes instead of 43Gigabytes. I find cifs a bit faster than smbfs too. Praise
participants (3)
-
Chadley Wilson
-
Mike Coan
-
Praise