The Samba service is not installed by default in the Ubuntu server version. Today, the company has a new computer, ready to install it as a server, so for the convenience of development, I deployed a samba, used to achieve window and Linux connection:
Concrete steps, I detailed view of Baidu, Master gathered, the following is summed up the experience of netizens, now write down, later useful will not have to look everywhere.
I. Samba installation:
sudo apt-get install samba
sudo apt-get install Smbfs
Two. Create a shared directory:
Mkdir/home/phinecos/share
sudo chmod 777/home/share
Three. Create Samba configuration file:
1. Save the existing configuration file
sudo cp/etc/samba/smb.conf/etc/samba/smb.conf.bak
2. Modify the present configuration file
sudo gedit/etc/samba/smb.conf
Last added in smb.conf
[Share]
Path =/home/share #这个就是我要共享的路径
available = yes
Browsealbe = yes public
= yes
writable = yes
Four. Create a Samba account
sudo touch/etc/samba/smbpasswd
sudo smbpasswd-a phinecos
Then you'll be asked to enter your Samba account password.
[If there is no fourth step, you will be prompted to session setup Failed:nt_status_logon_failure when you log in]
Five. Start, reboot, turn off the Samba server operation
Starting the Samba server requires only the following commands:
To turn off the samba server:
Reboot the Samba server:
#sudo/etc/init.d/samba Restart
Six. Test
Smbclient-l//localhost/share
Seven, using
Can enter the IP use under Windows, in the folder, enter "\" + "Ubuntu machine IP or host name" + "\" + "share"
For example:
\\10.126.72.250\Share This will allow us to access our shared directories under the Linux system Share
The above is a small set for you to introduce the use of Samba server in Ubuntu method, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!