smbfs: smbmount ignores uid and gid options
Rudi von Staden
rudivs at gmail.com
Wed Jan 26 05:54:01 UTC 2005
Okay, problem has been solved. It seems that Samba is quite clever
about facilitating linux to linux connections, and passes far more
file system information (metadata) than it does to Windows clients.
This has something to do with CIFS (Common Internet File Systems?)
support. So it's not surprising that things get a little funky with
linux connections when they don't with Windows connections, especially
if linux isn't expecting and doesn't know how to deal with this
metadata. So, the two ways of solving the problem:
1. Disable the CIFS metadata on the server side
If you want just a straight Samba setup as if it were a (dumb) Windows
server, you can disable the CIFS extensions. In our case we didn't
really need the added file system info, and actually some smb.conf
stuff which we needed got bypassed (like inherit permissions). It also
means that all the clients behave the same, making troubleshooting
easier. You can turn off the CIFS extensions by adding the following
line to the [global] section of smb.conf:
unix extensions = no
2. Tell linux to expect the CIFS metadata at mount time
This solution was actually found on one of the ubuntu forums:
http://ubuntuforums.org/showthread.php?t=12306
So using the following command worked:
sudo smbmount //server/share /mnt/share -o cifsexec,credentials=/etc/cifspw
with the file /etc/cifspw containing the following two lines (not sure
if this is necessary for it to work):
username=(username for server)
password=(password for server)
I'm no linux guru, so some of the information here may be incorrect,
but the two solutions work. There doesn't seem to be much information
out there about the cifsexec option of Samba, so I'm guessing Ubuntu
is using a pretty cutting edge version.
Rudi
On Mon, 24 Jan 2005 18:39:54 +0000, Pybe <squalidstuff at gmail.com> wrote:
> On Mon, 24 Jan 2005 17:17:04 +0200, Rudi von Staden <rudivs at gmail.com> wrote:
> > I have the same problem. I have an Ubuntu (Warty) server sharing
> > directories with smbfs. When I try to mount these directories on my
> > Ubuntu (Warty) laptop, it mounts, but I have no access to the files
> > unless their world permissions or user permissions allow access (so
> > the group permissions are ignored). If I then authenticate as root
> > (sudo -s), the permissions work correctly. I'm using smbmount with the
> > following command:
> >
> > sudo smbmount //server/share /mnt/share -o rw,username=me,uid=me
> >
> > Windows clients can connect to the share without problems, and my
> > laptop can connect to other Windows (FAT32) shares without a problem.
> > It's only the Samba to Samba shares that are an issue. I've also tried
> > connecting to the share using Samba on Knoppix and had the same
> > result.
>
> Shot in the dark but try mount -t smbfs //blah/blah /mnt/blah -o blah
>
> I put my mounts in fstab noauto and just mount by mount /mnt/blah as
> it saves me writing all the options alot.
>
> HTH
> Pybe
More information about the ubuntu-users
mailing list