[Samba] mount read/write ntfs via samba

mashtin.bakir at gmail.com mashtin.bakir at gmail.com
Mon Jan 28 16:32:00 GMT 2008

Until now, we've been using samba to push out unix files to windows users.
Security = domain, this works perfectly. Now we'd like to go the other way
ie mount
on the linux side our PC files. Using

mount -t smbfs -username=administrator //pc-server/users /PCuser

works but all files appear to be owned by root so users can't  write to
their own files.

I can add dmask=777, fmask=666 but then anyone can overwrite anything.

I was thinking of perhaps having the users mount the partition themselves eg
add to sudoers
    smith ALL=/bin/mount

and then having smith
  mkdir ~/mypcfiles
mount -t smbfs -username=smith //pc-server/user/smith ~/mypcfiles

but smith gets "tree connect failed: ERRDOS - ERRnosuchshare (You specified
an invalid share name)"

Does the share need to be in some other format? Is the above a reasonable
way to go? (I imagine I should
probably further limit what smith can mount in sudo)  or is there perhaps a
better way to do this using some
other UID mapping technique such as create a credentials file (how does one
populate it?)


More information about the samba mailing list