I'm trying to reconfigure Samba/CIFS on a CentOS client machine specifically because the current setup requires any users logged into the machine to sudo writes to the samba share. I want to take away the sudo privileges while still providing a means to write to the share.
I'm inclined to think that no changes need to be made on the server end, as I have a newly configured Debian client that works (almost) perfectly. I say almost because it throws me warnings like mv: failed to preserve ownership for `/media/smbshare/somefile.xls': Permission denied. (If I could make this go away, that would of course be a bonus.)
Just to provide some more background, I've used the following guides on both Debian and Ubuntu with success:
I tried to take similar steps on the CentOS machine: I first created a group 'samba' and, using 'sudo visudo' added the following line:
%samba ALL=(ALL) /sbin/mount,/sbin/umount,/sbin/mount.cifs,/sbin/umount.cifs
(I've experimented with both /sbin/mount and /bin/mount)
I then added myself to the group, unmounted and remounted, tried to write again, no luck.
Next: I made some edits to the fstab file. The old line read:
//10.0.1.3/smbshare /mnt/smbshare cifs credentials=/root/smbcreds 0 0
I've played around with different configurations, adding gid=samba, file_mode=0777, dir_mode=0777, noserverio, in different combinations, unmount and remount and no apparent difference.
Perhaps then a problem with the UNIX style permissions on the client? As follows:
drwxrwxrwx 101 nobody nobody 0 Jun 7 05:04 smbshare
But it appears that read/write/execute is granted to all?