ubuntu配置samba

前端之家收集整理的这篇文章主要介绍了ubuntu配置samba前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

sudo apt-get install samba

root@UbnCom:/home/zhangbin/ynclub/myapp# sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
root@UbnCom:/home/zhangbin/ynclub/myapp# sudo mkdir -p /home/share
root@UbnCom:/home/zhangbin/ynclub/myapp# sudo chmod 777 /home/share
root@UbnCom:/home/zhangbin/ynclub/myapp# sudo vim /etc/samba/smb.conf

增加

[share]
comment = smb share
path=/home/share
browseable = yes
writable =yes

root@UbnCom:/home/zhangbin/ynclub/myapp# sudo service smbd restart
smbd stop/waiting
smbd start/running,process 4707
root@UbnCom:/home/zhangbin/ynclub/myapp# sudo vim /etc/samba/smb.conf root@UbnCom:/home/zhangbin/ynclub/myapp# sudo service smbd restart
smbd stop/waiting
smbd start/running,process 4728
root@UbnCom:/home/zhangbin/ynclub/myapp# sudo smbpasswd -a spg
New SMB password:
Retype new SMB password:
Added user spg.

端口是 139和445
root@UbnCom:/home/zhangbin/ynclub/myapp# netstat -tlnp | grep smb
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 4728/smbd
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 4728/smbd
tcp6 0 0 :::445 :::* LISTEN 4728/smbd
tcp6 0 0 :::139 :::* LISTEN 4728/smbd
root@UbnCom:/home/zhangbin/ynclub/myapp#

windows端用这个映射:

\172.16.34.99\share

原文链接:https://www.f2er.com/ubuntu/351980.html

猜你在找的Ubuntu相关文章