On 03/05/19 15:35, Fred Smith wrote:
Yes. Put it in fstab instead of defaults.
I use this for the options in fstab:
credentials=/root/.smbcred,defaults,uid=my-username,gid=my-username,auto,users,exec,vers=3.0
the credentials= points to a file with read-only permissions, owned by root. it contains
username=xxx password=yyy
vers=3.0 restricts it to version 3.0 of the SMB protocol. If your file share supports that version it's a good idea to restrict it on both the server and the clients, since earlier versions of SMB are rife with holes.
for the uid= and gid= items you can also user the numerical value, from /etc/passwd and /etc/group.
I find this works fine with my NAS box, which I talk to via SMB.
. Well, I think I've tried all the things suggested in this thread however I still need to be root to add to or make changes to the Samba data, run Thunar as root works. The best I have been able to do is put this in fstab: //192.168.1.48/smbBOX48 /mnt/box48/ cifs defaults,credentials=/root/.smbcreds 0 0
With credentials: [root@Box83 bobg]# cat /root/.smbcreds # /root/.smbcreds
username= password=9ic0A7Y9LoQ
So perhaps I have something set wrong in the smb server. The data is mounted on /mnt/box48 and the permissions do not allow write in anything but root despite having been changed via chmod 777. [root@Box83 bobg]# ll /mnt/ total 32 drwxrwxr-x. 2 bobg bobg 4096 Feb 24 12:50 apple drwxr-xr-x. 2 root root 0 Mar 3 12:11 box48
However umount /mnt/box48 shows the changed permissions which change back to the above as soon as box48 is mounted:
[root@Box83 bobg]# ll /mnt/ total 36 drwxrwxr-x. 2 bobg bobg 4096 Feb 24 12:50 apple drwxrwxrwx. 2 bobg root 4096 Nov 28 19:10 box48
As I said earlier, my daughter has no problem writing date to the server from her Apple devices while I have to do these things as root, reading as user works as expected.
I hesitate to go messing around making trial and error changes in the server. I would appreciate some help, guidance to point me in the right direction if possible.