分类: LINUX
2008-06-22 16:39:36
代码: |
sudo apt-get install samba
sudo apt-get install smbfs |
代码: |
mkdir /home/ray/share
chmod 777 /home/ray/share |
代码: |
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf |
代码: |
; security = user |
代码: |
security = user
username map = /etc/samba/smbusers |
代码: |
[Share]
comment = Shared Folder with username and password path = /home/ray/share public = yes writable = yes valid users = newsfan create mask = 0700 directory mask = 0700 force user = nobody force group = nogroup available = yes browseable = yes |
代码: |
workgroup = WORKGROUP
display charset = UTF-8 unix charset = UTF-8 dos charset = cp936 |
代码: |
sudo useradd newsfan |
代码: |
sudo smbpasswd -a newsfan
sudo gedit /etc/samba/smbusers |
代码: |
newsfan = "network username" |
代码: |
sudo smbpasswd -a newsfan |
代码: |
sudo testparm
sudo /etc/init.d/samba restart |