・samba のインストール

[root@alma]# dnf -y install samba
[root@alma]# dnf -y install samba-common
[root@alma]# dnf -y install samba-common-tools
[root@alma]# dnf -y install samba-client

・ユーザーの作成

既存のユーザーを samba の接続ユーザーとする

[root@alma]# pdbedit -a *****
new password:******
retype new password:******

・samba の設定

[root@alma]# vi /etc/samba/smb.conf
# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.
#
# Note:
# SMB1 is disabled by default. This means clients without support for SMB2 or
# SMB3 are no longer able to connect to smbd (by default).

接続設定

[global]
workgroup = SAMBA
※ワークグループ<Workgroup>
workgroup = ******
security = user

passdb backend = tdbsam

unix charset = UTF-8※Linux 側用文字コードを追記
dos charset = CP932※Windows 側用文字コードを追記
wins support = yes※Wins(NetBios(Windows)) サーバー機能を追記

printing = cups
printcap name = cups
load printers = yes
cups options = raw

共有フォルダ設定

[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
※フォルダ表示
browseable = yes
read only = No
inherit acls = Yes

プリンター設定

[printers]
プリンター共有設定を利用しない場合は以下全てコメント化
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable =

プリンター設定

[print$]
プリンター共有設定を利用しない場合は以下全てコメント化
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @printadmin root
force group = @printadmin
create mask = 0664
directory mask = 0775

・構文チェック

[root@alma]# testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Weak crypto is allowed by GnuTLS (e.g. NTLM as a compatibility fallback)

Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions※enter を押下