[linux-cifs-client] cifs fstab issues (was cifs issues)

Steven French sfrench at us.ibm.com
Thu Apr 28 22:34:11 GMT 2005






> Steve,
>
> I'm having a heck of a time using cifs in fstab to allow users to mount
> filesystems. I've posted to the Samba mailing list with no replies so I
hope
> you don't mind a direct email.
>
> I'm using a 2.6.11 kernel and Samba 3.0.14a.
>
> My thoughts are that the fstab user parameter is conflicting with the
cifs
> user parameter but it appears that in the Samba changlog adjustments were

> made for this. I also found this thread:
> http://lists.samba.org/archive/samba-technical/2004-December/038384.html
but
> the code as described doesn't seem to exist anymore.
>
> For some reason "//server/share  /mnt/point  cifs  rw,user,noauto  0 0"
in
> fstab just doesn't work for me (and mount.cifs is SUID).
>
> Also would like to see the credentials file hold the domain parameter in
> addition to username and password.

Check the version of mount.cifs  (/sbin/mount.cifs -V).  You may have Samba
3.0.14a, but an older mount.cifs
(mount.cifs.c is not always updated in the minor security Samba point
releases)
The more current version of mount.cifs is trivial to build (gcc
mount.cifs.c -o mount.cifs) and copy to /sbin/mount.cifs.
You can get the mount.cifs.c from the version on the project download page
(which is 1.7 version IIRC, not quite current)
 or from Samba 3.0 svn (subversion). I will probably put a prebuilt one up
there too.

On the question of the "user" parm, IIRC if the mount.cifs.c didn't strip
it out you would see a message about a bad user (since
the name of the user was expected after user by the kernel code unless
mount.cifs strips it out) show up in
the dmesg log.

On your second question, you can do
      user=DOMAIN\username
I don't know whether you could with your version of mount.cifs. It should
work fine in current mount.cifs (which is 1.8 version now).
Also following your suggested I added parsing for the domain name in the
credential file (domain name is specified by domain=
on the beginning of a line) e.g. a sample credential file might contain:
username=myusername
password=mypassword
domain=TUX-NET

Enjoy.  Let me know if you find any problems with it.   It would also be
helpful to open a samba bugzilla bug on this, so the
distros have a bug # to map against the new versions of mount.cifs

Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench at-sign us dot ibm dot com

-------------- next part --------------
HTML attachment scrubbed and removed


More information about the linux-cifs-client mailing list