2026-03-12 21:01:38
This commit is contained in:
23
tiddlywiki/SAMBA (cifs) mount on Linux.txt
Executable file
23
tiddlywiki/SAMBA (cifs) mount on Linux.txt
Executable file
@@ -0,0 +1,23 @@
|
||||
-- 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
|
||||
|
||||
Reference in New Issue
Block a user