[COLUG] NFS on Windows Unified Data Storage Server 2003
Brian Miller
bnmille at gmail.com
Tue Aug 21 19:43:21 EDT 2007
On Tuesday 21 August 2007 9:13:26 am Scott Merrill wrote:
> RHEL4 and and above use CIFS, rather than SMB. I can execute this:
> # mount -t cifs -o credentials=/etc/samba/ad.cred //fs1/home /mnt
>
> But then the contents of the mount are all owned by root. I can chown
> and chgrp on a user's directory in the CIFS-mounted share, and I see on
> the Linux client that ownership has changed. The permissions on the
> home directory are reported as mode 777; but as root I cannot access the
> contents of that user's home directory.
>
> Are the specific mount.cifs options you might recommend?
I haven't worked with Samba for awhile, but it looks like "mount -t cifs" is
the replacement for smbmount. According to
http://lists.samba.org/archive/samba-technical/2006-July/048385.html and
http://forums.fedoraforum.org/archive/index.php/t-96458.html you should be
able to use the options for smbmount when issuing a mount -t cifs command.
The man page for smbmount is available here:
http://www.linuxcommand.org/man_pages/smbmount8.html
>From your earlier post, it looks like you are trying to create a single mount
from Linux to the Windows server, as both user and shared directories are
under one larger share point. I would create an entry in /etc/fstab for that
mount point, and include the option "user" or "users", depending on how the
workstations will be used. I would also add "noauto". This will allow
regular users to mount the share. When actually mounting the share, they
should use the username= argument, which would be their username on the
Windows system. If they don't include the password as part of the command,
they should be prompted for it. This will log them in with their user rights
on the Windows server. If you have a one-to-one relationship between
workstations and users, I would recommend that the mount point be located
under the user's home directory on Linux.
The mode 777 is to be expected. It basically says Linux isn't providing any
file level security; it's all handled by Windows. I get the same thing when
connecting to a NetWare server from Linux. But don't let that fool you.
File permissions on the file server are enforced (which is why root can't get
to the files, since user root is an anonymous user to Windows).
If you want to try to get automount working, here's some information from
someone who developed a script to get smbmount to work with it:
http://www.wittsend.com/mhw/smbmount.html
I've never used it, and I'm sure you'd have to hack it some to use
the "mount -t cifs" options, but if you've got the time and want to make your
users really happy . . .
Let me know if I can offer any more advice.
More information about the colug432
mailing list