sudo apt-get install samba
sudo apt-get install smbfs
sudo apt-get install system-config-samba
首先安装samba软件:
sudo apt-get install samba
sudo apt-get install smbfs
sudo apt-get install samba4
chmod 777 /home/<current user>
#add a user for samba
sudo useradd samba
sudo smbpasswd -a samba
#add this user to samb
sudo vi /etc/samba/smbusers
#add in smbusers
samba = “network username”
#this samba can't login in local
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo vi /etc/samba/smb.conf
#add at last
[Share]
comment = Shared Folder For Samba
path = /home/<current user>
public = yes
writable = yes
valid users = samba
create mask = 0700
directory mask = 0700
force user = <current user>
force group = <current user>
available = yes
browseable = yes
#check parma
sudo testparm
sudo smbd restart