ubunt 下 配置samba 伺服器

來源:互聯網
上載者:User

一. 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

 

 

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.