Page 4 of 4 FirstFirst ... 234
Results 31 to 36 of 36

Thread: Best practices on EXT4 and SAMBA

  1. #31
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Best practices on EXT4 and SAMBA

    Quote Originally Posted by Will_Moonen View Post
    What exactly seems to be broken and why?
    And of course I'm interested in fixing things.
    The short answer is as I previously stated; the hosts file and WINS broken. @JKyleOKC has also commented on the hosts problem. The WINS problem is a configuration problem in the smb.conf file.

    First the DNS problem. When a Linux host checks for a dns hostname it first checks its own /etc/hosts file. Then it checks the local dns server for LAN resolution. You appear to have not configured a local DNS server to the host TANK. In no instance should a Samba server's local hostname (e.g tank) be forwarded to the Internet to attempt resolution. The FQDN is not relevant to the issue except to gain the hostname only. The local hosts file is dependent on static IP address use. With proper entries in the /etc/hosts file your server will resolve it's hostname without needing a DNS lookup. This is the proper way of configuring hosts/DNS. Your /etc/hosts should have an entry like this
    Code:
    will@tank:~$ cat /etc/hosts
    # Loopback address available to this host only
    127.0.0.1       localhost
    # The eth0 network interface for LAN connectivity (calling this host by it's hostname)
    192.168.0.150       tank
    ...assuming that the host TANK is 192.168.0.150. What host uses 192.168.122.1? Is that the host NAS?

    Here is what my /etc/hosts file looks like for my workstation
    Code:
    # loopback Interface
    127.0.0.1       localhost
    # Infrastructure Devices
    192.168.1.1     bb-gw1
    192.168.1.200   bb-hp1
    192.168.1.245   bb-ap1
    # hosts on Network
    192.168.1.3     malibu
    192.168.1.4     manila
    192.168.1.2     rincon
    192.168.1.5     ventura
    Now to the WINS problem. It's not working at all. This debug entry shows that
    Code:
    resolve_wins: using WINS server 69.172.201.208 and tag '*'
    samba_tevent: EPOLL_CTL_DEL EBADF for fde[0x7eff72359340] mpx_fde[(nil)] fd[14] - disabling
    ...This is because the resolve_wins routine is looking for a WINS server at
    Code:
    69.172.201.208
    This is a public Internet address and should never have a WINS server configured on it. Samba is for private local LAN's only. In fact checking that address reveals this is public IP address for Peer 1 Network (USA) Not a WINS server at all.

    Your configuration of WINS in the smb.conf file is incorrect also. This could be part of the problem. I have colored the orighinal to the smb.conf comments to green. See my comments in red below. The section of the smb.conf file that configures WINS

    Code:
    # Windows Internet Name Serving Support Section:
    
    # WINS Support - Tells the NMBD component of Samba to enable its WINS Server 
       wins support = yes
    
    The boolean above controls whether the nmbd daemon in Samba on this host (TANK) will act as a WINS server. 
    #You should not set this to yes unless you have a multi-subnetted network and you wish a particular nmbd to be your WINS server. 
    # Note that you should NEVER set this to yes on more than one machine in your network.
    
    # 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 = morpheus.local.net  <--What is the IP address of this host?
    
    # This specifies the IP address (or DNS name ( the IP address is preferred)) of the WINS server that nmbd daemon should register with. 
    # If you have a WINS server on your network then you should set this to the WINS server's IP.   
    # Tank is now asking to be a client of some other WINS server.  See the comments in green just above the parameter.  
    #   FYI: Since this is never seen by a human after it is configured you should keep this as simple as possible -- use the IP address instead of 
    #   having the DNS name resolved.  If the DNS server errors you have no access to the WINS server if you use a FQDN.
    
    # This will prevent nmbd to search for NetBIOS names through DNS.
       dns proxy = yes
    I'm not experiencing any issues - connectivity or otherwise.
    Ahhh, but you are. You just don't know it. Windows sharing and Samba have plenty of security holes so it should never be used over the Internet (no public addressing at all). If you want this to work using the hosts files (dns) then you need to set that up correctly. If you want WINS to work you need to set that up correctly. If you want to close the possible security breach casued by the attempts to resolve a WINS server name via the public Internet, you need to set that up correctly also.

    Keep in mind that I have forced a Windows 2003 server to be master browser and DNS forwarder.
    I have manually entered tank.local.net in that DNS database.
    Most likely, this is why it doesn't affect me?
    You are affected. I don't see any reason for the Windows 2003 server to always win the MB election or for it to forward any local.net inquries. In fact DNS is only needed on a very limited basis andyou haven't set that up correctly anyway.

    The reason it all works is because Samba continues its attemps to connect using this list of methods
    Code:
    name resolve order = lmhosts wins host bcast
    ...they all fail until you get to bcast (the original Windows way) and then it works.

    The bottom line is you need to either set up the hosts file and WINS correctly, or, set up the system to only use bcast and close the potential security breach with WINS that you have . Either way will work on a small to moderately sized single segment LAN.

    Which way do you want to proceed? Or do you just want to leave it as it is?
    -BAB1

  2. #32
    Join Date
    Sep 2014
    Beans
    41
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Best practices on EXT4 and SAMBA

    The server indicated by morpheus.local.net has IP address 192.168.0.250.
    This server is configured as a DNS forwarder and WINS server (i.e. MB) - or at least that is how it's supposed to work.

    The general idea is that the DNS forwarder caches DNS client requests including the translation from their <something>.local.net to IP address being 192.168.0.<something> and v.v. Therefor preventing the use of the hosts file as much as possible.

    I don't know where 69.172.201.208 and 192.168.122.1 are coming from.

    This morpheus server is supposed to be replaced by thank. Or better, I'm using tank to learn Ubuntu to the extend that I can apply this knowledge to transform morpheus from a Windows 2003 server into an Ubuntu server.

    So the way I want to proceed is change things to whatever is needed to support this initiative.

    Do I make myself clear? And perhaps more important, does it make sense?

  3. #33
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Best practices on EXT4 and SAMBA

    Quote Originally Posted by Will_Moonen View Post
    The server indicated by morpheus.local.net has IP address 192.168.0.250.
    This server is configured as a DNS forwarder and WINS server (i.e. MB) - or at least that is how it's supposed to work.
    The only way I know to configure a Windows 2003 server to act as a DNS server is to use "DCPromo" Did you do that?

    A Samba WINS client should not be configured as the WINS server. These are two different things. The way you have Samba configured is as both a WINS server and a WINS client. This is NOT CORRECT. You need to fix that. WINS is not working for Samba right now.

    What did you do to insure that the Windows server was always the MB?

    The general idea is that the DNS forwarder caches DNS client requests including the translation from their <something>.local.net to IP address being 192.168.0.<something> and v.v. Therefor preventing the use of the hosts file as much as possible.
    Configuring Windows DNS does not prevent the Linux host from checking the /etc/hosts file first. In fact Linux always checks the hosts file before DNS. Since Samba is not finding the correct hostname anywhere it is failing to successfully use the "hosts" method.

    I don't know where 69.172.201.208 and 192.168.122.1 are coming from.
    I told you. It's because the "hosts" method of name resolution is not working correctly.

    This morpheus server is supposed to be replaced by thank. Or better, I'm using tank to learn Ubuntu to the extend that I can apply this knowledge to transform morpheus from a Windows 2003 server into an Ubuntu server.
    Your original post was " how to replace Windows 2003 filesharing with SAMBA" This is not the same as replacing the entire Active Directory (AD) Domain Controller (DC) itself.

    By your description the host morpheus is as an Active Directory (AD) Domain Controller (DC) server. Not just a file server. If you want TANK to be an DC you have a lot more to do than just setting up shares. Are you aware of that? Samba v4 is capable of providing that functionality but is not a trivial thing. The learning curve is huge.
    So the way I want to proceed is change things to whatever is needed to support this initiative.

    Do I make myself clear? And perhaps more important, does it make sense?
    Not in my mind. I doesn't make much sense if you can't even get the Samba server to perform correctly as a standalone file server. There are two aspects to both of these servers. Whether you are speaking of Windows2003 or Samba v4 you have a "file server" component and a "centralized user and networking" (DC) component.

    If using Samba as a DC is what you want then you need to read and understand these documents:
    https://wiki.samba.org/index.php/Samba_AD_DC_HOWTO

    https://wiki.samba.org/index.php/User_Documentation

    http://www.samba.org/samba/GUI/

    http://ubuntuforums.org/showthread.php?t=2146198

    You should have a working knowledge of TCP/IP networking, DNS, DHCP, Kerberos and LDAP for this project to be successful well as NETBIOS and Windows sharing for the basic file sharing.

    I still suggest you fix the Samba server errors you have now before you update it to a DC replacement. If you don't do that you will have more problems as you go along.

    Good Luck. This is going to be a long complex project.
    -BAB1

  4. #34
    Join Date
    Sep 2014
    Beans
    41
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Best practices on EXT4 and SAMBA

    In principle, I know how DHCP, DNS and WINS works. This includes when the hosts file is used.

    As far as DNS and the hosts file goes, I prefer adding DNS entries as opposed to adding entries in the hosts file.
    This way I have a single instance for the translation between name and IP address as the stations asking for an IP address through DHCP can not interact with the hosts file. While these stations are able to interact with a DNS service.

    There is *no* AD and *no* DC involved - the Windows 2003 server indicated as morpheus or morpheus.local.net (IP is 192.168.0.250) is acting as a basic, single fileserver - no authorization against an AD on a DC.

    As far as installing the DNS service goes: it can be installed as a standalone network service - see also: http://support2.microsoft.com/kb/814591.
    Years ago, around the Matrix-1 movie release timeframe, I installed and configured this basic Windows file server. Some time after, I added the network service WINS and DNS. Never was I asked for a DCpromo to make things happen - it only wanted to know a (DNS) domain name - which is where local.net comes from.

    So all and all, in terms of the post title, I would say it is still valid. Because again, there is *no* AD and *no* DC and I have *no* intention in adding these.

    What I meant with "I don't know where 69.172.201.208 and 192.168.122.1 are coming from." is that I don't know where these requests are coming from - as in: who is the initiator. I'm planning for some packet capturing to figure out where it comes from (i.e. initiates this).

    Assuming that we are still on the same page with this: below are the latest versions of hosts, smb.conf and the output of smbtree -d3.

    Code:
    127.0.0.1    localhost
    
    127.0.1.1    tank
    127.0.1.1    tank.local.net
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    =====

    Code:
    will@tank:~$ sudo smbtree -d3
    lp_load_ex: refreshing parameters
    Initialising global parameters
    rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
    params.c:pm_process() - Processing configuration file "/etc/samba/smb.conf"
    Processing section "[global]"
    added interface eth0 ip=192.168.0.150 bcast=192.168.0.255 netmask=255.255.255.0
    added interface virbr0 ip=192.168.122.1 bcast=192.168.122.255 netmask=255.255.255.0
    Enter root's password:
    Connecting to 192.168.122.1 at port 445
    Doing spnego session setup (blob length=74)
    got OID=1.3.6.1.4.1.311.2.2.10
    got principal=not_defined_in_RFC4178@please_ignore
    Got challenge flags:
    Got NTLMSSP neg_flags=0x608a8215
    NTLMSSP: Set final flags:
    Got NTLMSSP neg_flags=0x60088215
    NTLMSSP Sign/Seal - Initialising with flags:
    Got NTLMSSP neg_flags=0x60088215
    NEBUCHADNEZZAR
    Connecting to 192.168.122.1 at port 445
    Doing spnego session setup (blob length=74)
    got OID=1.3.6.1.4.1.311.2.2.10
    got principal=not_defined_in_RFC4178@please_ignore
    Got challenge flags:
    Got NTLMSSP neg_flags=0x608a8215
    NTLMSSP: Set final flags:
    Got NTLMSSP neg_flags=0x60088215
    NTLMSSP Sign/Seal - Initialising with flags:
    Got NTLMSSP neg_flags=0x60088215
            \\TANK                          tank server (Samba, Ubuntu)
    Connecting to 192.168.0.150 at port 445
    Doing spnego session setup (blob length=74)
    got OID=1.3.6.1.4.1.311.2.2.10
    got principal=not_defined_in_RFC4178@please_ignore
    Got challenge flags:
    Got NTLMSSP neg_flags=0x608a8215
    NTLMSSP: Set final flags:
    Got NTLMSSP neg_flags=0x60088215
    NTLMSSP Sign/Seal - Initialising with flags:
    Got NTLMSSP neg_flags=0x60088215
                    \\TANK\IPC$             IPC Service (tank server (Samba, Ubuntu))
                    \\TANK\Data2            Shared data2
                    \\TANK\Data1            Shared data1
                    \\TANK\print$           Printer Drivers
            \\NAS                           LG-NAS server
    Connecting to 192.168.0.251 at port 445
    Doing spnego session setup (blob length=42)
    got OID=1.3.6.1.4.1.311.2.2.10
    got principal=NONE
    Got challenge flags:
    Got NTLMSSP neg_flags=0x608a8215
    NTLMSSP: Set final flags:
    Got NTLMSSP neg_flags=0x60088215
    NTLMSSP Sign/Seal - Initialising with flags:
    Got NTLMSSP neg_flags=0x60088215
                    \\NAS\IPC$              IPC Service (LG-NAS server)
                    \\NAS\cdrom             CD-ROM device
                    \\NAS\Data              Data @ volume 1
                    \\NAS\FTP               FTP folder @ volume1
                    \\NAS\service$          Default Service Folder
    will@tank:~$
    =====

    Code:
    #
    # Sample configuration file for the Samba suite for Debian GNU/Linux.
    #
    #
    # This is the main Samba configuration file. You should read the
    # smb.conf(5) manual page in order to understand the options listed
    # here. Samba has a huge number of configurable options most of which 
    # are not shown in this example
    #
    # Some options that are often worth tuning have been included as
    # commented-out examples in this file.
    #  - When such options are commented with ";", the proposed setting
    #    differs from the default Samba behaviour
    #  - When commented with "#", the proposed setting is the default
    #    behaviour of Samba but the option is considered important
    #    enough to be mentioned here
    #
    # 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]
    
    ## Browsing/Identification ###
    
    # Change this to the workgroup/NT-domain name your Samba server will part of
       workgroup = nebuchadnezzar
    
    # server string is the equivalent of the NT Description field
       server string = %h server (Samba, Ubuntu)
    
    # Windows Internet Name Serving Support Section:
    # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
       wins support = no
    
    # 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 = 192.168.0.250
    
    # This will prevent nmbd to search for NetBIOS names through DNS.
       dns proxy = yes
    
    #### Networking ####
    
    # The specific set of interfaces / networks to bind to
    # This can be either the interface name or an IP address/netmask;
    # interface names are normally preferred
    ;   interfaces = 127.0.0.0/8 eth0
    
    # Only bind to the named interfaces and/or networks; you must use the
    # 'interfaces' option above to use this.
    # It is recommended that you enable this feature if your Samba machine is
    # not protected by a firewall or is a firewall itself.  However, this
    # option cannot handle dynamic or non-broadcast interfaces correctly.
    ;   bind interfaces only = yes
    
    
    
    #### Debugging/Accounting ####
    
    # This tells Samba to use a separate log file for each machine
    # that connects
       log file = /var/log/samba/log.%m
    
    # Cap the size of the individual log files (in KiB).
       max log size = 1000
    
    # If you want Samba to only log through syslog then set the following
    # parameter to 'yes'.
    #   syslog only = no
    
    # We want Samba to log a minimum amount of information to syslog. Everything
    # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
    # through syslog you should set the following parameter to something higher.
       syslog = 0
    
    # Do something sensible when Samba crashes: mail the admin a backtrace
       panic action = /usr/share/samba/panic-action %d
    
    
    ####### Authentication #######
    
    # Server role. Defines in which mode Samba will operate. Possible
    # values are "standalone server", "member server", "classic primary
    # domain controller", "classic backup domain controller", "active
    # directory domain controller". 
    #
    # Most people will want "standalone sever" or "member server".
    # Running as "active directory domain controller" will require first
    # running "samba-tool domain provision" to wipe databases and create a
    # new domain.
       server role = standalone server
    
    # If you are using encrypted passwords, Samba will need to know what
    # password database type you are using.  
       passdb backend = tdbsam
       obey pam restrictions = yes
    
    # This boolean parameter controls whether Samba attempts to sync the Unix
    # password with the SMB password when the encrypted SMB password in the
    # passdb is changed.
       unix password sync = yes
    
    # For Unix password sync to work on a Debian GNU/Linux system, the following
    # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
    # sending the correct chat script for the passwd program in Debian Sarge).
       passwd program = /usr/bin/passwd %u
       passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    
    # This boolean controls whether PAM will be used for password changes
    # when requested by an SMB client instead of the program listed in
    # 'passwd program'. The default is 'no'.
       pam password change = yes
    
    # This option controls how unsuccessful authentication attempts are mapped
    # to anonymous connections
       map to guest = bad user
    
    ########## Domains ###########
    
    #
    # The following settings only takes effect if 'server role = primary
    # classic domain controller', 'server role = backup domain controller'
    # or 'domain logons' is set 
    #
    
    # It specifies the location of the user's
    # profile directory from the client point of view) The following
    # required a [profiles] share to be setup on the samba server (see
    # below)
    ;   logon path = \\%N\profiles\%U
    # Another common choice is storing the profile in the user's home directory
    # (this is Samba's default)
    #   logon path = \\%N\%U\profile
    
    # The following setting only takes effect if 'domain logons' is set
    # It specifies the location of a user's home directory (from the client
    # point of view)
    ;   logon drive = H:
    #   logon home = \\%N\%U
    
    # The following setting only takes effect if 'domain logons' is set
    # It specifies the script to run during logon. The script must be stored
    # in the [netlogon] share
    # NOTE: Must be store in 'DOS' file format convention
    ;   logon script = logon.cmd
    
    # This allows Unix users to be created on the domain controller via the SAMR
    # RPC pipe.  The example command creates a user account with a disabled Unix
    # password; please adapt to your needs
    ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
    
    # This allows machine accounts to be created on the domain controller via the 
    # SAMR RPC pipe.  
    # The following assumes a "machines" group exists on the system
    ; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
    
    # This allows Unix groups to be created on the domain controller via the SAMR
    # RPC pipe.  
    ; add group script = /usr/sbin/addgroup --force-badname %g
    
    ############ Misc ############
    
    # 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
    ;   include = /home/samba/etc/smb.conf.%m
    
    # Some defaults for winbind (make sure you're not using the ranges
    # for something else.)
    ;   idmap uid = 10000-20000
    ;   idmap gid = 10000-20000
    ;   template shell = /bin/bash
    
    # Setup usershare options to enable non-root users to share folders
    # with the net usershare command.
    
    # Maximum number of usershare. 0 (default) means that usershare is disabled.
    ;   usershare max shares = 100
    
    # Allow users who've been granted usershare privileges to create
    # public shares, not just authenticated ones
       usershare allow guests = yes
    
    #======================= Share Definitions =======================
    
    # 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 = yes
    
    # 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 = 0700
    
    # 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 = 0700
    
    # By default, \\server\username shares can be connected to by anyone
    # with access to the samba server.
    # Un-comment the following parameter to make sure that only "username"
    # can connect to \\server\username
    # This might need tweaking when using external authentication schemes
    ;   valid users = %S
    
    # Un-comment the following and create the netlogon directory for Domain Logons
    # (you need to configure Samba to act as a domain controller too.)
    ;[netlogon]
    ;   comment = Network Logon Service
    ;   path = /home/samba/netlogon
    ;   guest ok = yes
    ;   read only = yes
    
    # Un-comment the following and create the profiles directory to store
    # users profiles (see the "logon path" option above)
    # (you need to configure Samba to act as a domain controller too.)
    # The path below should be writable by all users so that their
    # profile directory may be created the first time they log on
    ;[profiles]
    ;   comment = Users profiles
    ;   path = /home/samba/profiles
    ;   guest ok = no
    ;   browseable = no
    ;   create mask = 0600
    ;   directory mask = 0700
    
    [printers]
       comment = All Printers
       browseable = no
       path = /var/spool/samba
       printable = yes
       guest ok = no
       read only = yes
       create mask = 0700
    
    # Windows clients look for this share name as a source of downloadable
    # printer drivers
    [print$]
       comment = Printer Drivers
       path = /var/lib/samba/printers
       browseable = yes
       read only = yes
       guest ok = no
    # Uncomment to allow remote administration of Windows print drivers.
    # You may need to replace 'lpadmin' with the name of the group your
    # admin users are members of.
    # Please note that you also need to set appropriate Unix permissions
    # to the drivers directory for these users to have write rights in it
    ;   write list = root, @lpadmin
    
    [Data1]
       comment = Shared data1
       path = /srv/samba/data1
       browseable = yes
    
       valid users = @admins
       force group = admins
       writeable = yes
    
       create mask = 0664
       force directory mode = 0755
    
    [Data2]
       comment = Shared data2
       path = /srv/samba/data2
       browseable = yes
    
       valid users = @regular
       force group = regular
       writeable = yes
    
      create mask = 0664
      force directory mode = 0755
    Any comment on this? Anything you would like me to change?

  5. #35
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Best practices on EXT4 and SAMBA

    Quote Originally Posted by Will_Moonen View Post
    In principle, I know how DHCP, DNS and WINS works. This includes when the hosts file is used.

    As far as DNS and the hosts file goes, I prefer adding DNS entries as opposed to adding entries in the hosts file.
    This way I have a single instance for the translation between name and IP address as the stations asking for an IP address through DHCP can not interact with the hosts file. While these stations are able to interact with a DNS service.

    There is *no* AD and *no* DC involved - the Windows 2003 server indicated as morpheus or morpheus.local.net (IP is 192.168.0.250) is acting as a basic, single fileserver - no authorization against an AD on a DC.

    As far as installing the DNS service goes: it can be installed as a standalone network service - see also: http://support2.microsoft.com/kb/814591.
    Years ago, around the Matrix-1 movie release timeframe, I installed and configured this basic Windows file server. Some time after, I added the network service WINS and DNS. Never was I asked for a DCpromo to make things happen - it only wanted to know a (DNS) domain name - which is where local.net comes from.

    So all and all, in terms of the post title, I would say it is still valid. Because again, there is *no* AD and *no* DC and I have *no* intention in adding these.
    You sound like a lawyer advocating your position or a salesman making a pitch.

    Samba file services do not include the installation of DHCP or DNS, If you want to install these Ubuntu packages (ISC DHCP server and BIND9) outside of the integrated Samba packages for these services in a DC environment you certainly can. It is outside the scope of " filesharing with SAMBA" in this thread. I would create 2 new threads. One asking how to install and configure the ISC DHCP server package (isc-dhcp-server) and all the appropriate utilities and another separate thread on installing BIND9 and all of its utilities.
    What I meant with "I don't know where 69.172.201.208 and 192.168.122.1 are coming from." is that I don't know where these requests are coming from - as in: who is the initiator. I'm planning for some packet capturing to figure out where it comes from (i.e. initiates this).
    I already know the answer to this. You have fixed it with the proper WINS configuration.

    Assuming that we are still on the same page with this ...
    I don't think we are. So let me be blunt about my position. I won't help you in this forum thread with DHCP or DNS package install or configuration. You need to open 2 new threads. One for each subject.

    below are the latest versions of hosts, smb.conf and the output of smbtree -d3.
    Code:
    127.0.0.1    localhost
    
    127.0.1.1    tank
    127.0.1.1    tank.local.net
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    =====

    Code:
    will@tank:~$ sudo smbtree -d3
    lp_load_ex: refreshing parameters
    Initialising global parameters
    rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
    params.c:pm_process() - Processing configuration file "/etc/samba/smb.conf"
    Processing section "[global]"
    added interface eth0 ip=192.168.0.150 bcast=192.168.0.255 netmask=255.255.255.0
    added interface virbr0 ip=192.168.122.1 bcast=192.168.122.255 netmask=255.255.255.0
    Enter root's password:
    Connecting to 192.168.122.1 at port 445
    Doing spnego session setup (blob length=74)
    got OID=1.3.6.1.4.1.311.2.2.10
    got principal=not_defined_in_RFC4178@please_ignore
    Got challenge flags:
    Got NTLMSSP neg_flags=0x608a8215
    NTLMSSP: Set final flags:
    Got NTLMSSP neg_flags=0x60088215
    NTLMSSP Sign/Seal - Initialising with flags:
    Got NTLMSSP neg_flags=0x60088215
    NEBUCHADNEZZAR
    Connecting to 192.168.122.1 at port 445
    Doing spnego session setup (blob length=74)
    got OID=1.3.6.1.4.1.311.2.2.10
    got principal=not_defined_in_RFC4178@please_ignore
    Got challenge flags:
    Got NTLMSSP neg_flags=0x608a8215
    NTLMSSP: Set final flags:
    Got NTLMSSP neg_flags=0x60088215
    NTLMSSP Sign/Seal - Initialising with flags:
    Got NTLMSSP neg_flags=0x60088215
            \\TANK                          tank server (Samba, Ubuntu)
    Connecting to 192.168.0.150 at port 445
    Doing spnego session setup (blob length=74)
    got OID=1.3.6.1.4.1.311.2.2.10
    got principal=not_defined_in_RFC4178@please_ignore
    Got challenge flags:
    Got NTLMSSP neg_flags=0x608a8215
    NTLMSSP: Set final flags:
    Got NTLMSSP neg_flags=0x60088215
    NTLMSSP Sign/Seal - Initialising with flags:
    Got NTLMSSP neg_flags=0x60088215
                    \\TANK\IPC$             IPC Service (tank server (Samba, Ubuntu))
                    \\TANK\Data2            Shared data2
                    \\TANK\Data1            Shared data1
                    \\TANK\print$           Printer Drivers
            \\NAS                           LG-NAS server
    Connecting to 192.168.0.251 at port 445
    Doing spnego session setup (blob length=42)
    got OID=1.3.6.1.4.1.311.2.2.10
    got principal=NONE
    Got challenge flags:
    Got NTLMSSP neg_flags=0x608a8215
    NTLMSSP: Set final flags:
    Got NTLMSSP neg_flags=0x60088215
    NTLMSSP Sign/Seal - Initialising with flags:
    Got NTLMSSP neg_flags=0x60088215
                    \\NAS\IPC$              IPC Service (LG-NAS server)
                    \\NAS\cdrom             CD-ROM device
                    \\NAS\Data              Data @ volume 1
                    \\NAS\FTP               FTP folder @ volume1
                    \\NAS\service$          Default Service Folder
    will@tank:~$
    =====

    Code:
    #
    # Sample configuration file for the Samba suite for Debian GNU/Linux.
    #
    #
    # This is the main Samba configuration file. You should read the
    # smb.conf(5) manual page in order to understand the options listed
    # here. Samba has a huge number of configurable options most of which 
    # are not shown in this example
    #
    # Some options that are often worth tuning have been included as
    # commented-out examples in this file.
    #  - When such options are commented with ";", the proposed setting
    #    differs from the default Samba behaviour
    #  - When commented with "#", the proposed setting is the default
    #    behaviour of Samba but the option is considered important
    #    enough to be mentioned here
    #
    # 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]
    
    ## Browsing/Identification ###
    
    # Change this to the workgroup/NT-domain name your Samba server will part of
       workgroup = nebuchadnezzar
    
    # server string is the equivalent of the NT Description field
       server string = %h server (Samba, Ubuntu)
    
    # Windows Internet Name Serving Support Section:
    # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
       wins support = no
    
    # 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 = 192.168.0.250
    
    # This will prevent nmbd to search for NetBIOS names through DNS.
       dns proxy = yes
    
    #### Networking ####
    
    # The specific set of interfaces / networks to bind to
    # This can be either the interface name or an IP address/netmask;
    # interface names are normally preferred
    ;   interfaces = 127.0.0.0/8 eth0
    
    # Only bind to the named interfaces and/or networks; you must use the
    # 'interfaces' option above to use this.
    # It is recommended that you enable this feature if your Samba machine is
    # not protected by a firewall or is a firewall itself.  However, this
    # option cannot handle dynamic or non-broadcast interfaces correctly.
    ;   bind interfaces only = yes
    
    
    
    #### Debugging/Accounting ####
    
    # This tells Samba to use a separate log file for each machine
    # that connects
       log file = /var/log/samba/log.%m
    
    # Cap the size of the individual log files (in KiB).
       max log size = 1000
    
    # If you want Samba to only log through syslog then set the following
    # parameter to 'yes'.
    #   syslog only = no
    
    # We want Samba to log a minimum amount of information to syslog. Everything
    # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
    # through syslog you should set the following parameter to something higher.
       syslog = 0
    
    # Do something sensible when Samba crashes: mail the admin a backtrace
       panic action = /usr/share/samba/panic-action %d
    
    
    ####### Authentication #######
    
    # Server role. Defines in which mode Samba will operate. Possible
    # values are "standalone server", "member server", "classic primary
    # domain controller", "classic backup domain controller", "active
    # directory domain controller". 
    #
    # Most people will want "standalone sever" or "member server".
    # Running as "active directory domain controller" will require first
    # running "samba-tool domain provision" to wipe databases and create a
    # new domain.
       server role = standalone server
    
    # If you are using encrypted passwords, Samba will need to know what
    # password database type you are using.  
       passdb backend = tdbsam
       obey pam restrictions = yes
    
    # This boolean parameter controls whether Samba attempts to sync the Unix
    # password with the SMB password when the encrypted SMB password in the
    # passdb is changed.
       unix password sync = yes
    
    # For Unix password sync to work on a Debian GNU/Linux system, the following
    # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
    # sending the correct chat script for the passwd program in Debian Sarge).
       passwd program = /usr/bin/passwd %u
       passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    
    # This boolean controls whether PAM will be used for password changes
    # when requested by an SMB client instead of the program listed in
    # 'passwd program'. The default is 'no'.
       pam password change = yes
    
    # This option controls how unsuccessful authentication attempts are mapped
    # to anonymous connections
       map to guest = bad user
    
    ########## Domains ###########
    
    #
    # The following settings only takes effect if 'server role = primary
    # classic domain controller', 'server role = backup domain controller'
    # or 'domain logons' is set 
    #
    
    # It specifies the location of the user's
    # profile directory from the client point of view) The following
    # required a [profiles] share to be setup on the samba server (see
    # below)
    ;   logon path = \\%N\profiles\%U
    # Another common choice is storing the profile in the user's home directory
    # (this is Samba's default)
    #   logon path = \\%N\%U\profile
    
    # The following setting only takes effect if 'domain logons' is set
    # It specifies the location of a user's home directory (from the client
    # point of view)
    ;   logon drive = H:
    #   logon home = \\%N\%U
    
    # The following setting only takes effect if 'domain logons' is set
    # It specifies the script to run during logon. The script must be stored
    # in the [netlogon] share
    # NOTE: Must be store in 'DOS' file format convention
    ;   logon script = logon.cmd
    
    # This allows Unix users to be created on the domain controller via the SAMR
    # RPC pipe.  The example command creates a user account with a disabled Unix
    # password; please adapt to your needs
    ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
    
    # This allows machine accounts to be created on the domain controller via the 
    # SAMR RPC pipe.  
    # The following assumes a "machines" group exists on the system
    ; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
    
    # This allows Unix groups to be created on the domain controller via the SAMR
    # RPC pipe.  
    ; add group script = /usr/sbin/addgroup --force-badname %g
    
    ############ Misc ############
    
    # 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
    ;   include = /home/samba/etc/smb.conf.%m
    
    # Some defaults for winbind (make sure you're not using the ranges
    # for something else.)
    ;   idmap uid = 10000-20000
    ;   idmap gid = 10000-20000
    ;   template shell = /bin/bash
    
    # Setup usershare options to enable non-root users to share folders
    # with the net usershare command.
    
    # Maximum number of usershare. 0 (default) means that usershare is disabled.
    ;   usershare max shares = 100
    
    # Allow users who've been granted usershare privileges to create
    # public shares, not just authenticated ones
       usershare allow guests = yes
    
    #======================= Share Definitions =======================
    
    # 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 = yes
    
    # 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 = 0700
    
    # 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 = 0700
    
    # By default, \\server\username shares can be connected to by anyone
    # with access to the samba server.
    # Un-comment the following parameter to make sure that only "username"
    # can connect to \\server\username
    # This might need tweaking when using external authentication schemes
    ;   valid users = %S
    
    # Un-comment the following and create the netlogon directory for Domain Logons
    # (you need to configure Samba to act as a domain controller too.)
    ;[netlogon]
    ;   comment = Network Logon Service
    ;   path = /home/samba/netlogon
    ;   guest ok = yes
    ;   read only = yes
    
    # Un-comment the following and create the profiles directory to store
    # users profiles (see the "logon path" option above)
    # (you need to configure Samba to act as a domain controller too.)
    # The path below should be writable by all users so that their
    # profile directory may be created the first time they log on
    ;[profiles]
    ;   comment = Users profiles
    ;   path = /home/samba/profiles
    ;   guest ok = no
    ;   browseable = no
    ;   create mask = 0600
    ;   directory mask = 0700
    
    [printers]
       comment = All Printers
       browseable = no
       path = /var/spool/samba
       printable = yes
       guest ok = no
       read only = yes
       create mask = 0700
    
    # Windows clients look for this share name as a source of downloadable
    # printer drivers
    [print$]
       comment = Printer Drivers
       path = /var/lib/samba/printers
       browseable = yes
       read only = yes
       guest ok = no
    # Uncomment to allow remote administration of Windows print drivers.
    # You may need to replace 'lpadmin' with the name of the group your
    # admin users are members of.
    # Please note that you also need to set appropriate Unix permissions
    # to the drivers directory for these users to have write rights in it
    ;   write list = root, @lpadmin
    
    [Data1]
       comment = Shared data1
       path = /srv/samba/data1
       browseable = yes
    
       valid users = @admins
       force group = admins
       writeable = yes
    
       create mask = 0664
       force directory mode = 0755
    
    [Data2]
       comment = Shared data2
       path = /srv/samba/data2
       browseable = yes
    
       valid users = @regular
       force group = regular
       writeable = yes
    
      create mask = 0664
      force directory mode = 0755
    Any comment on this? Anything you would like me to change?
    The above looks fine to me. The smbtree -d3 output has no errors now.

    If you want to allow TANK to become the WINS server you may do so. Just set TANK to be the WINS server and stop pointing to 192.168.0.250 as a WINS client.

    Other than that we have accomplished all that we can regarding Samba file sharing. Good luck with integrating DHCP and DNS on the host TANK.
    -BAB1

  6. #36
    Join Date
    Sep 2014
    Beans
    41
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Best practices on EXT4 and SAMBA

    Thanks for the help.

    I agree to creating 2 new threads. So after doing some homework on these topics as how it is supposed to work within Ubuntu/Linux, I will create these 2 topics. Hope to hear from you there!

Page 4 of 4 FirstFirst ... 234

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •