ubunt 下 配置samba 服务器
一. samba的安裝:
sudo apt-get insall samba
sudo apt-get install smbfs
?
二。修改/etc/samba/smb.conf
sudo gedit /etc/samba/smb.conf
?
在smb.conf最后添加
[myShare]
comment = Shared Folder with username and password
path = /home/wangy
writeable = yes
browseable = yes
guest ok = yes
create mask = 0777
directory mask = 0777
available = yes
public=no //no表示除了user1這個用戶,其它用戶在進入samba服務器后看不見wangy這個目錄,如果為yes,雖然能看見wangy這個目錄,但除了user1這個用戶能進入這個目錄,其它人進不了。
?
為了使gesst用戶可以訪問,還要將security 設定為share
####### Authentication #######
# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
# in the samba-doc package for details.
#?? security = user
security = share
?
三? 修改共享目錄/home/wangy權限
cd /home/wangy
sudo chmod -R 777 /home/wangy
?
四.重新啟動服務
sudo service samba restart
其他命令
sudo service samba start
sudo service samba stop
?
#/etc/init.d/samba restart
#/etc/init.d/samba start
#/etc/init.d/samba stop
?
轉載于:https://www.cnblogs.com/zhoug2020/archive/2012/04/02/2430082.html
總結
以上是生活随笔為你收集整理的ubunt 下 配置samba 服务器的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 一个微软面试题--关于位结构体
- 下一篇: 手机MMI体系结构及其实现