Ubuntu 16.04 (VM) enables Samba service to share files with Windows

Source: Internet
Author: User

1, install Samba

sudo apt-get Insall Samba

sudo apt-get install SMBFS use the command "sudo apt-get insall samba" installation times wrong: Dpkg:error processing Package Samba (--configure) later Google to may be The Samba configuration file is missing "/etc/samba/smb.conf", so you create a new document and copy the basic content from the Web. There's no error. Not sure whether this error and configuration file missing is directly related, because in the middle tried a lot of methods, such as various delete, reload. 2, set the configuration file in the configuration file "/etc/samba/smb.conf" and finally add the following configuration:

[Share]
Path=/srv/public
Available=yes
Browseable=yes
Public=yes
Writable=yes
Guest Ok=yes

3, use the command "sudo testparm" to test the configuration document for errors.

No error after pressing ENTER, and the following interface shows that the configuration document does not have a problem:

4. Start Samba Service

I started the Samba service using the "sudo systemctl start Samba" command. View status and the service will stop after the restart.

Execute the Enable command error:

[Email protected]:~# sudo systemctl enable Samba
Samba.service is isn't a native service, redirecting to Systemd-sysv-install
Executing/lib/systemd/systemd-sysv-install Enable Samba
Update-rc.d:error:samba Default-start contains no runlevels, aborting.

It is not affected by the temporary use, so temporarily ignore this error.

Access shared files on 5:ubuntu:

To install the smbclient, the installation process is quite smooth here:

sudo aptitude install-y smbclient

Use the command:

Smbclient//192.168.189.128/share link to shared folder: ' 192.168.189.128 ' is my Ubuntu native IP address that can be queried by ifconfig command.

Share is added in the configuration document "/etc/samba/smb.conf" above.

6,windows (Win7 64) Access the shared folder:

Enter the file path: \\192.168.189.128\share, you can manipulate the folder.

Problems encountered during configuration refer to the following linked article:

Issue List

/etc/samba/smb.conf Content

Ubuntu 16.04 (VM) enables Samba service to share files with Windows

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.