How to deploy the Samba server in Ubuntu _linux

Source: Internet
Author: User

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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.