Install Samba on Linux 16.04 LTS

Source: Internet
Author: User
Tags one more line

suggeted reading:

1. Man smb.conf

2. Man smbpasswd


Steps:

Do the following commands

sudo apt-get install Samba

Cd/etc/samba

SUDP CP smb.conf Smb.conf.bak

sudo vim/etc/smb.conf


In the file smb.conf, find sections [homes], uncomment and modify the related lines, you'll get the following lines in [H Omes] section:

Comment = Home directories
browseable = yes

Read Only = no


Create mask = 0775


Directory mask = 0775


If you're a Linux user, let's say, with Name ' abc ' and when you connect this Linux PC with Samba, you shall also use the SAM e name, which is ' abc '. This would allow your to access your home directory in your Linux PC.

Suppose your user name is "ABC", you Need to do:

sudo smbpasswd-a ABC

This command would allow you to add a samba user as well as to set the password for samba.

Then does the following command to enable the user:

SMBPASSWD-E ABC


Now, on your Windows PC, you can connect \\[IPADDRESS]\ABC, supplying the user name and the password. Then you'll be able to access your home directory.


That should is done for the most of the users. But your may is satisfied with the full home directory open to the connected user

If your you want to limit your accessible directory other than the default one, you can add one more line in your [homes] Section (Suppose-a directory named ' Workdir '):

Path =%h/workdir


Here, in Samba ' s language,%H means the home directory of the Linux user.


Install Samba on Linux 16.04 LTS

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.