Fedora36: File server settings

s50

Install samba.

Install samba.

[root@www ~]# 50_1dnf install samba samba-client samba-common -y

s51

Initial configuration of samba.

Back up samba configuration files.

[root@www ~]# 51_1mv /etc/samba/smb.conf /etc/samba/smb.conf.bk

s52Configure samba.

[root@www ~]# 52_1vi /etc/samba/smb.conf

s53Create a file.

53_1[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = fedora
security = user
map to guest = bad user
dns proxy = no
ntlm auth = yes
#==========================================================
[Share]
#Shared folder
path = /samba/share/
#Whether or not it is displayed in My Network
browsable = yes
#write permission
writable = yes
#Allow guest users to login
guest ok = yes
#Read permission
read only = no
#File attributes
force create mode = 0777
#Directory attributes
force directory mode = 0777

s60Create a shared folder.

root@www:~# mkdir /samba
root@www:~# mkdir /samba/share
root@www:~# 60_21chown nobody:nobody /samba/share
root@www:~# 60_22chmod 0777 /samba/share

s61Start automatically.

[root@www ~]# 61_1systemctl enable --now smb.service
[root@www ~]# 61_2systemctl enable --now nmb.service

s62Restart.

[root@www ~]# 62_1reboot

s63Restart the client Windows PC, open “Network” → “centos” → “Share” and confirm that writing is possible. (If “Network” → “centos” is not displayed, right-click anywhere on the desktop to create a new folder, right-click the new folder to create a shortcut, and right-click the shortcut to Open the properties and change the link destination to “\centos” to connect.)

WindowsPC

コメント

タイトルとURLをコピーしました