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.