SAMBA Configuration

Issues related to configuring your network
Post Reply
supertight
Posts: 171
Joined: 2017/02/07 21:47:51

SAMBA Configuration

Post by supertight » 2017/03/30 04:33:51

I'm trying to configure samba so I can see shared files on windows clients.
I'm using this tutorial:
https://wiki.centos.org/HowTos/SetUpSamba

I followed all the steps. My files are still not viewable.
I don't know where to start.
What are some common problems encountered with this tutorial?
I've fixed all the command lines for the firewall already. I'm sure something is missing.

Thanks for reading.
-Joe

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: SAMBA Configuration

Post by TrevorH » 2017/03/30 06:16:52

Did you read the section in the default /etc/samba/smb.conf about how to get it to work with selinux?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

supertight
Posts: 171
Joined: 2017/02/07 21:47:51

Re: SAMBA Configuration

Post by supertight » 2017/03/31 04:04:24

TrevorH wrote:Did you read the section in the default /etc/samba/smb.conf about how to get it to work with selinux?
No. I did the selinux steps outlined in the linked tutorial. I didn't see the additional lines inside the .conf file. I will read them.

I however don't think I'm having an selinux problem. I can't even see the box on the network. I think the fire wall is stopping me. I can't get system-conf-firewall-tui to open. I keep getting several dbus errors. fix an error and another pops up.

Why is this so much easier on centos7? I can configure 7 in about 15 minutes. Secured or Anonymous...

supertight
Posts: 171
Joined: 2017/02/07 21:47:51

Re: SAMBA Configuration

Post by supertight » 2017/03/31 04:13:42

**update**

- Turned off selinux to varify. No success.
- managed to get system-config-firewall-tui started. added samba to the list.
no success.
Reading samba.conf section on selinux now.

supertight
Posts: 171
Joined: 2017/02/07 21:47:51

Re: SAMBA Configuration

Post by supertight » 2017/04/02 05:56:08

I can't figure it out. I'm totally stumped. I'm getting nothing.
I searched 100 different tutorials. Youtube, Google, Forums. Nothing is working.

This is a fresh install of Cent0S-6.8-32Bit. selinux off, for testing. Samba approved in firewall.
here is my smb.conf:

Code: Select all


#======================= Global Settings =====================================

[global]

# ----------------------- Network Related Options -------------------------
#
# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
#
# server string is the equivalent of the NT Description field
#
# netbios name can be used to specify a server name not tied to the hostname
#
# Interfaces lets you configure Samba to use multiple interfaces
# If you have multiple network interfaces then you can list the ones
# you want to listen on (never omit localhost)
#
# Hosts Allow/Hosts Deny lets you restrict who can connect, and you can
# specifiy it as a per share option as well
#
        workgroup = WORKGROUP
        server string = Samba Server Version %v

        netbios name = PXEsvr

interfaces = eth0 192.168.1.11/24
;       hosts allow =

# --------------------------- Logging Options -----------------------------
#
# Log File let you specify where to put logs and how to split them up.
#
# Max Log Size let you specify the max size log files should reach

        # logs split per machine
        log file = /var/log/samba/log.%m
        # max 50KB per log file, then rotate
        max log size = 50

# ----------------------- Standalone Server Options ------------------------
#
# Scurity can be set to user, share(deprecated) or server(deprecated)
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.

        security = user
        passdb backend = tdbsam

# ----------------------- Domain Members Options ------------------------
#
# Security must be set to domain or ads
#
# Use the realm option only with security = ads
# Specifies the Active Directory realm the host is part of
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
#
# Use password server option only with security = server or if you can't
# use the DNS to locate Domain Controllers
# 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 = *


;       security = domain
;       passdb backend = tdbsam
;       realm = MY_REALM

;       password server = <NT-Server-Name>

# ----------------------- Domain Controller Options ------------------------
#
# Security must be set to user for domain controllers
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
#
# 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 Logons let Samba be a domain logon server for Windows workstations.
#
# Logon Scrpit let yuou specify a script to be run at login time on the client
# You need to provide it in a share called NETLOGON
#
# Logon Path let you specify where user profiles are stored (UNC path)
#
# Various scripts can be used on a domain controller or stand-alone
# machine to add or delete corresponding unix accounts
#
;       security = user
;       passdb backend = tdbsam

;       domain master = yes
;       domain logons = yes

        # the login script name depends on the machine name
;       logon script = %m.bat
        # the login script name depends on the unix user used
;       logon script = %u.bat
;       logon path = \\%L\Profiles\%u
        # disables profiles support by specifing an empty path
;       logon path =

;       add user script = /usr/sbin/useradd "%u" -n -g users
;       add group script = /usr/sbin/groupadd "%g"
;       add machine script = /usr/sbin/useradd -n -c "Workstation (%u)" -M -d /nohome -s /bin/false "%u"
;       delete user script = /usr/sbin/userdel "%u"
;       delete user from group script = /usr/sbin/userdel "%u" "%g"
;       delete group script = /usr/sbin/groupdel "%g"


# ----------------------- 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
#
# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
#
# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
;       local master = no
;       os level = 33
;       preferred master = yes

#----------------------------- Name Resolution -------------------------------
# Windows Internet Name Serving Support Section:
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
#
# - WINS Support: Tells the NMBD component of Samba to enable it's WINS Server
#
# - WINS Server: Tells the NMBD components of Samba to be a WINS Client
#
# - 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 one        WINS Server on the network. The default is NO.
#
# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups.

;       wins support = yes
;       wins server = w.x.y.z
;       wins proxy = yes

;       dns proxy = yes

# --------------------------- Printing Options -----------------------------
#
# Load Printers let you load automatically the list of printers rather
# than setting them up individually
#
# Cups Options let you pass the cups libs custom options, setting it to raw
# for example will let you use drivers on your Windows clients
#
# Printcap Name let you specify an alternative printcap file
#
# You can choose a non default printing system using the Printing option

        load printers = yes
        cups options = raw

;       printcap name = /etc/printcap
        #obtain list of printers automatically on SystemV
;       printcap name = lpstat
;       printing = cups

# --------------------------- Filesystem Options ---------------------------
#
# The following options can be uncommented if the filesystem supports
# Extended Attributes and they are enabled (usually by the mount option
# user_xattr). Thess options will let the admin store the DOS attributes
# in an EA and make samba not mess with the permission bits.
#
# Note: these options can also be set just per share, setting them in global
# makes them the default for all shares

;       map archive = no
;       map hidden = no
;       map read only = no
;       map system = no
;       store dos attributes = yes


#============================ Share Definitions ==============================

[homes]
        comment = Home Directories
        browseable = no
        writable = yes
        valid users = %S
        valid users = HOMEGROUP\%S

[printers]
        comment = All Printers
        path = /var/spool/samba
        browseable = no
        guest ok = no
        writable = no
        printable = yes

# Un-comment the following and create the netlogon directory for Domain Logons
;       [netlogon]
;       comment = Network Logon Service
;       path = /var/lib/samba/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 = /var/lib/samba/profiles
;       browseable = no
;       guest ok = yes


# A publicly accessible directory, but read only, except for people in
# the "staff" group
        [public]
        comment = Public Stuff
        path = /home/samba
        public = yes
        writable = yes
        printable = no
        write list = +staff

The only thing I can think of is I'm missing a package. However, I've searched that too and nothing. I'm not sure what to do next. Any Ideas at all?
- Thanks, Joe

billwest
Posts: 154
Joined: 2006/11/19 10:50:31
Location: Perth, Western Australia

Re: SAMBA Configuration

Post by billwest » 2017/04/02 11:57:04

In Centos 6.x you require cifs-utils, a package that was made unavailable some time ago with an update to samba, hence what you are trying to do is no longer possible in Centos 6.x.

I had it all working nicely until that change.

Bill.

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: SAMBA Configuration

Post by TrevorH » 2017/04/02 12:22:59

What? The cifs-utils package is still part of CentOS 6. It's in the base repo.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

supertight
Posts: 171
Joined: 2017/02/07 21:47:51

Re: SAMBA Configuration

Post by supertight » 2017/04/02 17:30:28

Found the culprit!
I had reset a router and forgot to reload the saved configuration. This consumer grade router has some security functions built in that will prohibit samba shares from showing on your windows PC.

Firewall and selinux are both on and configured to give network access. I have full function.

Post Reply