Files
notes/tiddlywiki/SAMBA (cifs) mount on Linux.txt
2026-03-12 22:01:38 +01:00

24 lines
714 B
Plaintext
Executable File

-- install cifs support
yum install cifs-utils.x86_64
-- create group/user owner for mapping ownership into cifs mount
-- we choosed to fix uid/guid identical across all machines using the Samba share
groupadd smbuser --gid 1502
useradd smbuser --uid 1502 -g smbuser -G smbuser
-- test cifs mount
mount -t cifs //192.168.0.9/share /mnt/yavin4 -o vers=2.0,uid=smbuser,gid=smbuser,file_mode=0775,dir_mode=0775,user=vplesnila
umount /mnt/yavin4
-- create credentials file for automount: /root/.smbcred
username=vplesnila
password=*****
-- add in /etc/fstab
//192.168.0.9/share /mnt/yavin4 cifs vers=2.0,uid=smbuser,gid=smbuser,file_mode=0775,dir_mode=0775,credentials=/root/.smbcred 0 0
-- test
mount -a