ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Topics
    2. Romo
    3. Posts
    • Profile
    • Following 3
    • Followers 2
    • Topics 54
    • Posts 875
    • Groups 0

    Posts

    Recent Best Controversial
    • Creating an anonymous samba share in CentOS 7

      Didn't find a how to on the subject in Mangolassi and we were discussing about it in another thread so I decided to create one.

      I started with a CentOS 7.2 minimal install:

      -All commands were run as root.
      -Installing the packages needed.
      yum install samba samba-client samba-common firewalld

      -Enabling and starting firewalld
      systemctl enable firewalld
      systemctl start firewalld

      -Changing to the samba directory, making a backup of the original file and creating a master file which will be turned into our smb.conf file with testparm -s.
      cd /etc/samba/
      mv smb.conf smb.conf.bak
      cp smb.conf.bak smb.conf.master
      vi smb.conf.master

      -While editing our file, in the global parameters we need to add the map to guest = Bad User option and then define our share:

      [sharename]
          path = /chosen/path
          read only = No
          guest ok = Yes
          browseable = Yes 
          public = Yes
      

      -Testing our smb.conf.master file for errors and create smb.conf file if none are found.
      testparm -s smb.conf.master > smb.conf

      The final file should look something like this.

      [global]
          workgroup = MYGROUP
          server string = Samba Server Version %v
          security = USER
          map to guest = Bad User
          log file = /var/log/samba/log.%m
          max log size = 50
          idmap config * : backend = tdb
          cups options = raw
      
      # User defined share 
      [public]
          path = /home/public
          read only = No
          guest ok = Yes
          browseable = Yes 
          public = Yes
      

      No we need to create our share in our filesystem, taking careful consideration of what path we specified in our smb.conf file. In this case I choose to create my share inside home and give it a name of public.
      cd /home
      mkdir public

      We change the owner of the folder and its permissions:
      chown nobody:nobody public/
      chmod 777 public/

      Enabling the needed services and starting them.
      systemctl enable smb.service
      systemctl enable nmb.service
      systemctl restart smb.service
      systemctl restart nmb.service

      Allowing samba through our firewall.
      firewall-cmd --permanent --add-service=samba
      firewall-cmd --reload

      And finally getting SELinux to allow clients to access the share.
      setsebool -P samba_export_all_ro=1 samba_export_all_rw=1
      getsebool –a | grep samba_export
      yum install policycoreutils-python
      semanage fcontext –at samba_share_t "/home/public(/.*)?"
      restorecon /home/public

      You should have a writable anonymous share that can be accessed from your Windows Clients.

      ** Edit
      Checking the ip address of my samba host
      ip addr show

      [root@localhost ~]# ip addr show
      1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      inet 127.0.0.1/8 scope host lo
         valid_lft forever preferred_lft forever
      inet6 ::1/128 scope host
         valid_lft forever preferred_lft forever
      2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
      link/ether 08:00:27:9f:69:b6 brd ff:ff:ff:ff:ff:ff
      inet 192.168.1.100/24 brd 192.168.1.255 scope global enp0s3
         valid_lft forever preferred_lft forever
      inet6 fe80::a00:27ff:fe9f:69b6/64 scope link
         valid_lft forever preferred_lft forever
      

      The ip address of my samba host is 192.168.1.100. Now we can access the share from our windows pc using \\192.168.1.100\public

      • Verifying our samba share exists in our server

        [root@localhost ~]# smbclient -L 192.168.1.100
        Enter root's password:
        Domain=[MYGROUP] OS=[Windows 6.1] Server=[Samba 4.2.10]
        
          Sharename       Type      Comment
          ---------       ----      -------
          public          Disk
          IPC$            IPC       IPC Service (Samba Server Version 4.2.10)
        
        Domain=[MYGROUP] OS=[Windows 6.1] Server=[Samba 4.2.10]
        
          Server               Comment
          ---------            -------
          LOCALHOST            Samba Server Version 4.2.10
        
          Workgroup            Master
          ---------            -------
          MYGROUP              LOCALHOST
          WORKGROUP            TECHNICOLOR
        

      -We can see samba properly shows our share, it is indeed named public as per our smb.conf file.

      -No we can mount our share in windows
      0_1471413349563_mapping-drive.png

      -Using \\192.168.1.100\public to connect to share
      0_1471413656079_mapping-drive-2.png

      Our share is now properly mounted and available in our Windows PC.

      0_1471413675060_mapping-drive-3.png

      posted in IT Discussion how to linux centos 7.2 samba 4
      RomoR
      Romo
    • RE: What Are You Doing Right Now

      @wirestyle22 Could you share your smb.conf file

      posted in Water Closet
      RomoR
      Romo
    • RE: DC DNS Settings

      So I should not change my DNS servers settings then?

      Primary: Second Dns
      Secondary: 127.0.0.1

      posted in IT Discussion
      RomoR
      Romo
    • RE: What Are You Doing Right Now

      @wirestyle22 Did you set up an anonymous share, or are you just sharing your home folder?

      posted in Water Closet
      RomoR
      Romo
    • RE: What Are You Doing Right Now

      @thanksajdotcom said in What Are You Doing Right Now:

      @wirestyle22 said in What Are You Doing Right Now:

      Last night I attempted to create a Plex VM using Samba to move files from my windows machine to my CentOS (Plex) server. I could only read, not write. Going home soon to try to figure out why. I believe I set up the permissions correctly, but maybe I have to go back through it.

      Just out of curiosity, for Plex, why do they need to do more than read? If you're streaming the files from the share, all they need is the ability to READ those shares, not write to them, as a rule...

      As I understand it, he can't write to the share, so he setup the share inside samba. He is actually trying to move data to the samba share from windows but since he doesn't have write access he can't.

      If he mounted a windows share inside his plex vm , then as you mention, he would only need read access to it @thanksajdotcom

      posted in Water Closet
      RomoR
      Romo
    • RE: DC DNS Settings

      @scottalanmiller said in DC DNS Settings:

      @Romo said in DC DNS Settings:

      Just found this in technet:

      The inclusion of its own IP address in the list of DNS servers improves performance and increases availability of DNS servers. However, if the DNS server is also a domain controller and it points only to itself for name resolution, it can become an island and fail to replicate with other domain controllers. For this reason, use caution when configuring the loopback address on an adapter if the server is also a domain controller. The loopback address should be configured only as a secondary or tertiary DNS server on a domain controller.

      https://technet.microsoft.com/en-us/library/dd378900(WS.10).aspx

      But it says if "only to itself", of course we would never say to skip having the secondary.

      Yes but it also says

      The loopback address should be configured only as a secondary or tertiary DNS server on a domain controller.

      It's really confusing.

      Even dell has it like that http://www.dell.com/support/article/us/en/04/SLN155801/en

      In a larger environment, at least two domain controllers at each physical site should be DNS servers. This provides redundancy in the event that one DC goes offline unexpectedly. Note that domain-joined machines must be configured to use multiple DNS servers in order to take advantage of this.
      If multiple DCs are configured as DNS servers, they should be configured to use each other for resolution first and themselves second. Each DC's list of DNS servers should include its own address, but not as the first server in the list. If a DC uses only itself for resolution, it may stop replicating with other DCs. This is obviously not an issue in a domain with only one DC.

      posted in IT Discussion
      RomoR
      Romo
    • RE: DC DNS Settings

      Just found this in technet:

      The inclusion of its own IP address in the list of DNS servers improves performance and increases availability of DNS servers. However, if the DNS server is also a domain controller and it points only to itself for name resolution, it can become an island and fail to replicate with other domain controllers. For this reason, use caution when configuring the loopback address on an adapter if the server is also a domain controller. The loopback address should be configured only as a secondary or tertiary DNS server on a domain controller.

      https://technet.microsoft.com/en-us/library/dd378900(WS.10).aspx

      posted in IT Discussion
      RomoR
      Romo
    • RE: What Are You Doing Right Now

      Good night @Joy

      posted in Water Closet
      RomoR
      Romo
    • RE: Please Welcome/Be nice to Interns

      @scottalanmiller said in Please Welcome/Be nice to Interns:

      @Romo said in Please Welcome/Be nice to Interns:

      @scottalanmiller said in Please Welcome/Be nice to Interns:

      Welcome slaves

      Eager to start working and learning!...... SIR.

      We've gotten no sleep around here. Trying to get enough done so that we can work on getting you all set up. Sorry about the delays, super exhausted here and not caught up yet from yesterday.

      Don't worry, there is really no hurry! Even though many of us may think you don't sleep @scottalanmiller , we do know you actually have scheduled maintenance sometimes. = )

      posted in Announcements
      RomoR
      Romo
    • RE: First Time Installing Linux on VirtualBox Problems

      @WrCombs Great!!

      posted in Water Closet
      RomoR
      Romo
    • RE: DC DNS Settings

      I always thought with 2 dns servers you set them to point at each other as primary and then to themselves as secondary. Most people always told my something like this:

      If multiple DCs are configured as DNS servers, they should be configured to use each other for resolution first and themselves second. Each DC's list of DNS servers should include its own address, but not as the first server in the list. If a DC uses only itself for resolution, it may stop replicating with other DCs. This is obviously not an issue in a domain with only one DC.

      posted in IT Discussion
      RomoR
      Romo
    • RE: Please Welcome/Be nice to Interns

      @scottalanmiller said in Please Welcome/Be nice to Interns:

      Welcome slaves

      Eager to start working and learning!...... SIR.

      posted in Announcements
      RomoR
      Romo
    • RE: First Time Installing Linux on VirtualBox Problems

      @WrCombs How did it go? Did you get Linux Mint installed?

      posted in Water Closet
      RomoR
      Romo
    • RE: I'll Show You Mine If You Show Me Yours, Home Labs

      @NashBrydges said in I'll Show You Mine If You Show Me Yours, Home Labs:

      0_1470265715466_Rack.jpg

      • Ubiquiti ES48-500W
      • Netgear GS724Tv3
      • 2 x PowerEdge R210II running HA Sophos UTM 9
      • 1 x PowerEdge R210II used for family remote backup
      • 1 x PowerEdge R210II for the teenage kid to run Minecraft and some other war game for he and his friends
      • PowerEdge R710 & MD1000 Veeam backup target (52TB RAID6)
      • Spare MD1000
      • PowerEdge R510 Hyper-V host running Plex media server (60TB RAID6)
      • PowerEdge R420 Hyper-V host running a bunch of VMs including various desktop OS for testing as well as FreePBX, Sophos iView, Fastvue
      • PowerEdge R610 spare server. Will probably get sold off as I haven't used it in some time.
      • 2 x Dell 1000VA UPS
      • Not pictured is a Synology DS2415+ as offsite backup target (80TB RAID6)

      Pretty nice setup @NashBrydges

      posted in IT Discussion
      RomoR
      Romo
    • RE: First Time Installing Linux on VirtualBox Problems

      @WrCombs no still version 18, you get to choose either 32 or 64

      0_1470247551769_tmp_28006-Screenshot_20160803-130357-846969851.png,

      posted in Water Closet
      RomoR
      Romo
    • RE: First Time Installing Linux on VirtualBox Problems

      @WrCombs try downloading the 32 bit version of Linux Mint.

      posted in Water Closet
      RomoR
      Romo
    • RE: Please Welcome/Be nice to Interns

      @Mike-Davis said in Please Welcome/Be nice to Interns:

      Welcome @WrCombs and @Romo!

      Thank you @Mike-Davis

      posted in Announcements
      RomoR
      Romo
    • RE: Please Welcome/Be nice to Interns

      Thank you everyone

      posted in Announcements
      RomoR
      Romo
    • RE: What Are You Doing Right Now

      @wirestyle22 yes samba would be the way.

      Tomorrow we could work on creating a guide on how to create samba shares, both authenticated and completely anonymous

      posted in Water Closet
      RomoR
      Romo
    • RE: What Are You Doing Right Now

      Very late visit to the "tianguis" with the Mrs to get some fruit and vegetables.

      0_1470167367549_tmp_3903-IMG_20160802_143452521-1257478994.jpg

      posted in Water Closet
      RomoR
      Romo
    • 1 / 1