修正正文内容.
Signed-off-by: rick.chan <chen.yang@yuzhen-iot.com>
This commit is contained in:
parent
953245e2a2
commit
3fe1018adb
|
@ -9,7 +9,7 @@ smbd 的运行依赖于 /etc/samba/smb.conf 配置文件,这个是 smbd 的默
|
|||
SELinux 开启的状态下会影响其他系统对 Samba 服务器的访问,可能造成 Windows 或 Android 系统的 Samba 客户端无法访问服务器(错误提示内容类似于没有授权之类),可以关闭 SELinux 或正确设置 SELinux。临时关闭 SELinux 的方法如下:
|
||||
|
||||
```bash
|
||||
setenforce 0
|
||||
sudo setenforce 0
|
||||
```
|
||||
|
||||
此时查看 SeLinux 状态
|
||||
|
@ -40,7 +40,7 @@ SELINUXTYPE=targeted
|
|||
|
||||
```bash
|
||||
# Ubuntu
|
||||
apt-get install samba samba-common
|
||||
sudo apt-get install samba samba-common
|
||||
# Manjaro
|
||||
sudo pacman -S samba
|
||||
```
|
||||
|
@ -71,9 +71,10 @@ sync always = yes
|
|||
在 shell 中输入如下命令为 samba 服务分配账户和密码
|
||||
|
||||
```bash
|
||||
# <user name> 必须是已存在的 Linux 用户
|
||||
sudo smbpasswd -a <user name>
|
||||
# 然后按提示输入密码并确认
|
||||
# <user name> 必须是已存在的 Linux 用户
|
||||
# 使能用户
|
||||
sudo smbpasswd -e <user name>
|
||||
```
|
||||
|
||||
|
@ -93,17 +94,17 @@ pdbedit -L
|
|||
|
||||
```bash
|
||||
# Manjaro
|
||||
systemctl enable smb.service
|
||||
systemctl start smb.service
|
||||
sudo systemctl enable smb.service
|
||||
sudo systemctl start smb.service
|
||||
# Ubuntu
|
||||
systemctl enable smbd.service
|
||||
systemctl start smbd.service
|
||||
sudo systemctl enable smbd.service
|
||||
sudo systemctl start smbd.service
|
||||
```
|
||||
|
||||
必要时需关闭防火墙,或设置防火墙规则。如果修改了 samba 配置信息,则需要重启 samba 服务:
|
||||
|
||||
```bash
|
||||
systemctl restart smb.service
|
||||
sudo systemctl restart smb.service
|
||||
```
|
||||
|
||||
## 6. 远程访问
|
||||
|
|
Loading…
Reference in New Issue