Samba configuration error. Thank you.

Source: Internet
Author: User
Tags bit set
Samba configuration error. Please refer to the following link for more information: Linux Enterprise Application-Linux server application. I installed linux 5 on my machine. Configure the samba service. The content of my SMB. CONF file is like this.
The folders I want to share are/hdata/share,/hdata/mdata,/hdata/rdata.
However, the problem is that three folders can be viewed in/hdata but cannot be entered. If you double-click the folder, the system will prompt that the folder cannot be accessed and you do not have the permission.
I use useradd *** to add a user, and then use the SMB User Password of smbpasswd. Then, set the user's directory to/hdata.
What is the problem. Thank you.


# This is the main Samba configuration file. You shoshould read
# Smb. conf (5) manual page in order to understand the options listed
# Here. Samba has a huge number of retriable options (perhaps too
# Success !) Most of which are not shown in this example
#
# For a step to step guide on installing, logging ing and using samba,
# Read the Samba-HOWTO-Collection. This may be obtained from:
# Http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
#
# Define working examples of smb. conf files can be found in
# Samba-Guide which is generated daily and can be downloaded from:
# Http://www.samba.org/samba/docs/Samba-Guide.pdf
#
# Any line which starts with a; (semi-colon) or a # (hash)
# Is a comment and is ignored. In this example we will use #
# For commentry and a; for parts of the config file that you
# May wish to enable
#
# NOTE: Whenever you modify this file you should run the command "testparm"
# To check that you have not made any basic syntactic errors.
#
#====================================== Global Settings ==================== ======================================
[Global]

# Workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
Workgroup = WORKGROUP

# Server string is the equivalent of the NT Description field
Server string = H Server

# Security mode. Defines in which mode Samba will operate. Possible
# Values are share, user, server, domain and ads. Most people will want
# User level security. See the Samba-HOWTO-Collection for details.
Security = user

Encrypt passwords = yes
Smb passwd file =/etc/samba/smbpasswd

# This option is important for security. It allows you to restrict
# Connections to machines which are on your local network.
# Following example restricts access to two C class networks and
# The "loopback" interface. For more examples of the syntax see
# The smb. conf man page
Hosts allow = 10.132.80.

# If you want to automatically load your printer list rather
# Than setting them up individually then you'll need this
Load printers = yes

# You may wish to override the location of the printcap file
; Printcap name =/etc/printcap

# On SystemV system setting printcap name to lpstat shoshould allow
# You to automatically obtain a printer list from the SystemV spool
# System
; Printcap name = lpstat

# It shoshould not be necessary to specify the print system type unless
# It is non-standard. Currently supported print systems include:
# Bsd, cups, sysv, plp, lprng, aix, hpux, qnx
; Printing = cups

# This option tells cups that the data has already been rasterized
Cups options = raw

# Uncomment this if you want a guest account, you must add this to/etc/passwd
# Otherwise the user "nobody" is used
; Guest account = pcguest

# This tells Samba to use a separate log file for each machine
# That connects
Log file =/var/log/samba/% m. log

# Put a capping on the size of the log files (in Kb ).
Max log size = 50

# Use password server option only with security = server
# The argument list may include:
# Password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
# Or to auto-locate the domain controller/s
# Password server = *
; Password server =

# Use the realm option only with security = ads
# Specifies the Active Directory realm the host is part
; Realm = MY_REALM

# Backend to store user information in. New installations shold
# Use either tdbsam or ldapsam. smbpasswd is available for backwards
# Compatibility. tdbsam requires no further configuration.
; Passdb backend = tdbsam

# Using the following line enables you to customise your configuration
# On a per machine basis. The % m gets replaced with the netbios name
# Of the machine that is connecting.
# Note: Consider carefully the location in the configuration file
# This line. The specified ded file is read at that point.
; Include =/usr/local/samba/lib/smb. conf. % m

# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# Here. See the man page for details.
; Interfaces = 192.168.12.2/24 192.168.13.2/24

# Browser Control Options:
# Set local master to no if you don't want Samba to become a master
# Browser on your network. Otherwise the normal election rules apply
; Local master = no

# OS Level determines the precedence of this server in master browser
# Elections. The default value shocould be reasonable
; OS level = 33

# Domain Master specifies Samba to be the Domain Master Browser. This
# Allows Samba to collate browse lists between subnets. Don't use this
# If you already have a Windows NT domain controller doing this job
; Domain master = yes

# Preferred Master causes Samba to force a local browser election on startup
# And gives it a slightly higher chance of winning the election
; Preferred master = yes

# Enable this if you want Samba to be a domain logon server
# Windows95 workstations.
; Domain logons = yes

# If you enable domain logons then you may want a per-machine or
# Per user logon script
# Run a specific logon batch file per workstation (machine)
; Logon script = % m. bat
# Run a specific logon batch file per username
; Logon script = % U. bat

# Where to store roving profiles (only for Win95 and WinNT)
# % L substitutes for this servers netbios name, % U is username
# You must uncomment the [Profiles] share below
; Logon path =\\ % L \ Profiles \ % U

# Windows Internet Name Serving Support Section:
# WINS Support-Tells the NMBD component of Samba to enable it's WINS Server
; Wins support = yes

# WINS Server-Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
; Wins server = w. x. y. z

# WINS Proxy-Tells Samba to answer name resolution queries on
# Behalf of a non WINS capable client, for this to work there must be
# At least oneWINS Server on the network. The default is NO.
; Wins proxy = yes

# DNS Proxy-tells Samba whether or not to try to resolve NetBIOS names
# Via DNS nslookups. The default is NO.
Dns proxy = no

# These scripts are used on a domain controller or stand-alone
# Machine to add or delete corresponding unix accounts
; Add user script =/usr/sbin/useradd % u
; Add group script =/usr/sbin/groupadd % g
; Add machine script =/usr/sbin/adduser-n-g machines-c Machine-d/dev/null-s/bin/false % u
; Delete user script =/usr/sbin/userdel % u
; Delete user from group script =/usr/sbin/deluser % u % g
; Delete group script =/usr/sbin/groupdel % g


#============================ Share Definitions ========== ==================================
; [Homes]
; Comment = Home Directories
; Browseable = no
; Writable = yes

# Un-comment the following and create the netlogon directory for Domain Logons
; [Netlogon]
; Comment = Network Logon Service
; Path =/usr/local/samba/lib/netlogon
; Guest OK = yes
; Writable = no
; Share modes = no


# Un-comment the following to provide a specific roving profile share
# The default is to use the user's home directory
; [Profiles]
; Path =/usr/local/samba/profiles
; Browseable = no
; Guest OK = yes


# NOTE: If you have a BSD-style print system there is no need
# Specifically define each individual printer
[Printers]
Comment = All Printers
Path =/usr/spool/samba
Browseable = no
# Set public = yes to allow user 'guest account' to print
Guest OK = no
Writable = no
Printable = yes

# This one is useful for people to share files
; [Tmp]
; Comment = Temporary file space
; Path =/tmp
; Read only = no
; Public = yes

# A publicly accessible directory, but read only, cannot t for people in
# The "staff" group
; [Public]
; Comment = Public Stuff
; Path =/home/samba
; Public = yes
; Writable = yes
; Printable = no
; Write list = @ staff

# Other examples.
#
# A private printer, usable only by fred. Spool data will be placed in fred's
# Home directory. Note that fred must have write access to the spool directory,
# Wherever it is.
; [Fredsprn]
; Comment = Fred's Printer
; Valid users = fred
; Path =/homes/fred
; Printer = freds_printer
; Public = no
; Writable = no
; Printable = yes

# A private directory, usable only by fred. Note that fred requires write
# Access to the directory.
; [Fredsdir]
; Comment = Fred's Service
; Path =/usr/somewhere/private
; Valid users = fred
; Public = no
; Writable = yes
; Printable = no

# A service which has a different directory for each machine that connects
# This allows you to tailor configurations to incoming machines. You cocould
# Also use the % U option to tailor it by user name.
# The % m gets replaced with the machine name that is connecting.
; [Pchome]
; Comment = PC Directories
; Path =/usr/pc/% m
; Public = no
; Writable = yes

# A publicly accessible directory, read/write to all users. Note that all files
# Created in the directory by users will be owned by the default user, so
# Any user with access can delete any other user's files. Obviously this
# Directory must be writable by the default user. Another user cocould of course
# Be specified, in which case all files wocould be owned by that user instead.
; [Public]
; Path =/usr/somewhere/else/public
; Public = yes
; Only guest = yes
; Writable = yes
; Printable = no

# The following two entries demonstrate how to share a directory so that two
# Users can place files there that will be owned by the specific users. In this
# Setup, the directory shocould be writable by both users and shocould have
# Sticky bit set on it to prevent abuse. obviusly this cocould be extended
# As required users as required.
; [Myshare]
; Comment = Mary's and Fred's stuff
; Path =/usr/somewhere/shared
; Valid users = mary fred
; Public = no
; Writable = yes
; Printable = no
; Create mask = 0765

[Data]
Comment = share
Path =/hdata/mdata
Writable = yes
Read only = yes
Browseable = yes

[Home]
Comment = share
Path =/hdata/rdata
Writable = yes
Read only = yes
Browseable = yes

[Share]
Comment = share
Path =/hdata/share
Writable = yes
Read only = yes
Browseable = yes
Related Article

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.