samba, cifs, credential, and file permissions
From: Ben (none_at_none.com)
Date: 09/25/05
- Next message: Mike Echo: "Re: Test out my Linux distro chooser!"
- Previous message: Mike Echo: "Re: Some questions about configuring..."
- Next in thread: HASM: "Re: samba, cifs, credential, and file permissions"
- Reply: HASM: "Re: samba, cifs, credential, and file permissions"
- Reply: Java Jive: "Re: samba, cifs, credential, and file permissions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 25 Sep 2005 00:37:35 -0400
Hi,
I'm a somewhat new user to Samba so maybe someone can help me out or
point me in the right direction.
I have a FC4 box networked to a WinXP box. Both boxes can see each other
successfully using samba shares. My problem is when I try to mount the
windows box in linux as a user (root mounts fine). As a user, If i try:
mount -t cifs //winbox/share /mnt/foo
I get the error:
mount: only root can do that
Which doesn't surprise me terribly because I remember getting that in
FC3. A workaround I found was to give user permission on the sticky(?) bit:
chmod a+s /usr/bin/smbmnt /usr/bin/smbumount
This works here also. My first question is, is that the best way to do
that or is there a more "proper" way to do that? I was doing that on the
command line, if that IS what I should be doing would it be the same (or
easier) to put a line is /etc/sudoers ?
Now, my REAL question is thus, I want to put a line in fstab for root
and user mount. Currently the following works only if I'm root (tabs
replaced with spaces to fit on one line):
//winbox/share /mnt/foo cifs credentials=/etc/goo,user 0 0
where the file /etc/goo has my username and password. Now, the problem
is I want to protect goo so that no one can read it since it has my
password in it. However, if I set permissions on goo to 600 (or 400)
then I get the following error attempting to mount:
error 13 opening credential file /etc/goo
If I set permissions so that others can read then the mount works but
obviously this is bad. I was trying to avoid creating a special group
for just root and me and setting goo to that group as a workaround. So
what's the proper way to set this up?, i.e get the entry in fstab
(without putting my password in fstab directly) and be able to mount as
a user?
Thanks.
Ben
- Next message: Mike Echo: "Re: Test out my Linux distro chooser!"
- Previous message: Mike Echo: "Re: Some questions about configuring..."
- Next in thread: HASM: "Re: samba, cifs, credential, and file permissions"
- Reply: HASM: "Re: samba, cifs, credential, and file permissions"
- Reply: Java Jive: "Re: samba, cifs, credential, and file permissions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|