Ubantu 16.4 samba installation configuration, ubantusamba

Source: Internet
Author: User

Ubantu 16.4 samba installation configuration, ubantusamba

This article summarizes how to install, configure, and use samba in the Ubantu 16.04 environment. This article is original and is my first blog. I will write blogs frequently in the future, record my own learning, summary, and research, and let my blog witness the path of my growth.

All the commands in the following section use the root permission or add the sudo command for execution.

1. samba Installation

apt-get install samba samba-common smbclient 

2. view the samba Service

After samba is successfully installed, the samba service is started by default.

 ps -ef | grep smb

  

3. Modify the samba configuration file/etc/samba/smb. conf.

#======================= Share Definitions =======================# Un-comment the following and create the netlogon directory for Domain Logons# Un-comment the following (and tweak the other settings below to suit)# to enable the default home directory shares. This will share each# user's home directory as \\server\username[homes]  comment = Home Directories  browseable = no# By default, the home directories are exported read-only. Change the# next parameter to 'no' if you want to be able to write to them.  read only = no# File creation mask is set to 0700 for security reasons. If you want to# create files with group=rw permissions, set next parameter to 0775.   create mask = 0775# Directory creation mask is set to 0700 for security reasons. If you want to# create dirs. with group=rw permissions, set next parameter to 0775.  directory mask = 0775

4. Restart the samba service.

/etc/init.d/samba restart

5. debug the samba Function

5.1 create a linux Logon account (for example, test_user/test_password)

adduser test_user

5.2 create a samba password for the test_user user

smbpasswd -a test_user

5.3 Verification

My Ubantu ip address is 192.168.131.128. on a windows Server, enter \ 192.168.131.128 \ test_user, and enter the password test_password as prompted.

If the file in this directory cannot be created or modified due to insufficient permissions, check whether "3. Modify samba configuration file/etc/samba/smb. conf" is correctly configured. For detailed samba configuration, see the comments in the/etc/samba/smb. conf file or use the man smb. conf command to view the configuration.

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.