linux服务器安装samba
# samba安装
yum install samba -y
1
# samba配置
[global]
workgroup = SAMBA
security = user
passdb backend = tdbsam
printing = cups
printcap name = cups
load printers = yes
cups options = raw
#[homes]
# comment = Home Directories
# valid users = %S, %D%w%S
# browseable = No
# read only = No
# inherit acls = Yes
[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @printadmin root
force group = @printadmin
create mask = 0664
directory mask = 0775
[company]
comment = company
path = /data/share
public = no
valid users =team1
printable = no
write list = team1
#ssl_ciphers=HIGH
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# 配置用户
#创建目录
mkdir -p /data/share
chmod 777 /data/share
#创建用户
useradd -d /data/share -s /sbin/nologin team1
#设置密码
pdbedit -a -u team1
1
2
3
4
5
6
7
2
3
4
5
6
7
# 启动服务
systemctl start smb
1
上次更新: 2024/09/09, 10:18:00