sudo apt-get install samba
sudo apt-get install python-glade2 system-config-samba
vim /etc/samba/smb.conf
更改以下項目
#======================= Share Definitions =======================
# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares. This will share each
# user's home directory as \\server\username
[homes]
comment = Home Directories
browseable = yes
# By default, the home directories are exported read-only. Change the
# next parameter to 'no' if you want to be able to write to them.
read only = no
# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
create mask = 0775
# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
directory mask = 0775
# By default, \\server\username shares can be connected to by anyone
# with access to the samba server.
# Un-comment the following parameter to make sure that only "username"
# can connect to \\server\username
# This might need tweaking when using external authentication schemes
valid users = %S
創造samba 帳戶和密碼
#smbpasswd -a "username"
enable user
#smbpasswd -e usernameenable user
重啟
#service smbd restart
使用windows 登入
連接網路磁碟機
\\server\username
=> 避免掛載新磁碟機到各user底下後無法access
sudo vi /etc/samba/smb.conf 在 [global] tag中加入
follow symlinks = yes
unix extensions = no
wide links = yes
沒有留言:
張貼留言
有敘述錯誤或者是觀念有問題歡迎指正