How to configure Samba on RHEL 6 | Network administration | RHCE 6 Study Guide. This tutorial explains how to configure SAMBA Server in Linux step by step with examples. Microsoft window use Common Internet File System (CIFS) protocol for networking. CIFS was developed from Server Message Block (SMB) protocol. ![]() · Experts Exchange > Questions > How to Install SWAT on Redhat Linux. RPM-GPG-KEY-CentOS-5 After that you can install samba-swat and continueing. <[email protected]> Resolves. configuration and administration of Red Hat Enterprise Linux 5.1. 20.5. Starting and Stopping Samba. Red Hat is the world’s leading provider of open source solutions. Linux, and middleware technologies. Red Hat also offers award-winning support. Redhat. · I have just downloaded the samba-4.0.9.tar.gz file from the Samba website and want to install Samba on my RedHat Linux machine, I have extracted the. Samba is a open source software. Samba uses TCP/IP protocol. Samba is Linux implementation of SMB/CIFS protocols. Samba allows interoperability between Linux and Window. Samba provide file and print sharing service between Linux and Window system. Samba allows Linux to interact with Window client, Server, member of Active Directory, Primary domain controller, or member server. Samba support Microsoft Access Control Lists. Main configuration file of Samba server is /etc/samba/smb. Samba Web Administration tool (SWAT) is a GUI base configuration tool for Samba Serveravailable from RHEL 6. Sharing Files Between RHEL 5 and Windows Systems with Samba. process do not install the samba. php?title=Sharing_Files_Between_RHEL_5_and_Windows.In Linux SAMBA provides the following services: User Authentication and authorization. File and printer sharing. Name resolution. Browsing. RHCE Exam topic covered in this article. Provide network shares to specific clients. Provide network shares suitable for group collaboration. During the RHCE exam you will not have access to Microsoft window so you must know how to test Samba configuration with Linux system. In this tutorial I will use two systems Server and linuxclient from our LAB environment. I will configure Samba Server on Server system and samba client on linuxclient system. If you want to check the network topology used in this article please check following article. Lab set up for RHCE 6 practice. RPM required for Samba Server. RPMDescriptionsamba. Base RPM for Samba Serversamba- client. Base RPM for Samba Clientsamba- common. Include commands those required by Samba Server and clientsamba- docprovide Samba documentationsamba- swat. GUI interface for Samba configurationsamba- winbind. Allow interoperability between Linux and Windowsamba- domainjoin- gui. Allow linux user to connect with windows workgroups and domains. LAB tasks. Configure Samba on Server system. Configure iptables firewall and SELinux Booleans to allow Samba connection on server. Create 5 users on Server system. Make a group of two users. Add all users in Samba user database. Check connectivity form linuxclient and windowclient system. Verify by login from one user. Create a sharedata folder on server. Grant read and write access to public on sharedata folder. Share publicly this folder. Test form linux and window client. Configure Samba Server. On samba server following RPM are requiredsambasamba- commonsamba- winbind. Check necessary rpm. You can install RPM from several sources including YUM repository, dump of RPM, FTP, etc. In this article I am installing RPM form RHEL 6 disk. Mount RHEL 6 disk in media folder and change directory to Package folder. Install necessary RPM. Samba Daemons. For Samba we need three services to run, one optional and two required. Service. Daemons. Description. Requiredsmbsmbd(SMB/CIFS Server) main samba service which provide user authentication and authorization and file and printer sharing. Requirednmbnmbd(Net. BIOS name server) Resources browsing. Optionalwinbindwinbindd. For host and user name resolution. If you have just installed RPM than these service would be stopped. Start necessary services. Make sure the services are running at the next time Linux is booted. How to allow samba through firewall. During the RHCE 6 exam we will have both firewall (iptables) and SELinux protection. To make Samba to communicate outside the server we have to configure iptables and SELinux. How to allow Samba in iptables. SAMBA uses ports 1. Port 1. 37. UDP Net. BIOS name service (WINS)Port 1. UDP Net. BIOS datagram. Port 1. 39. TCP Net. BIOS Session (TCP), Windows File and Printer Sharing. Port 4. 45. Microsoft- DS Active Directory, Windows shares (TCP)Port 4. Microsoft- DS SMB file sharing (UDP)To open firewall for Samba adds the following rules and restart the iptables. A INPUT - m state - -state NEW - m udp - p udp - -dport 1. ACCEPT. #iptables - A INPUT - m state - -state NEW - m udp - p udp - -dport 1. ACCEPT. #iptables - A INPUT - m state - -state NEW - m tcp - p tcp - -dport 1. ACCEPT. #iptables - A INPUT - m state - -state NEW - m tcp - p tcp - -dport 4. ACCEPTHow to allow Samba server from SELinux firewall. SELinux as a security feature prevents any viewing of a share automatically. SELinux is the complex security features of Linux. For RHCE 6 exam you should know following SELinux booleanssamba_enable_home_dirs. Enables the sharing of home directoriessamba_export_all_ro. Enable read- only access to any directorysamba_export_all_rw. Sets up read/write access to any directorysamba_share_t Default filewhich Samba can share. You can enables samba_export_all_ro or samba_export_all_rw Booleans in lab environment but it in real life that would be a security risk. Its good habit to set a file types for file and directories which need to be share via Samba. You can do that with following command# chcon - R - t samba_share_t /sharedata. In this example we enable /sharedata directory. Now Samba can share this directory. To share the default home directory run following command: setsebool - P samba_enable_home_dirs on- P makes sure the change preserve after reboot. You can create a new Samba user only from valid accounts on a Linux computer so create 5 users. Set password for all users. Avoid setting password for local system if you only creating these users for Samba service and do not want to grant them local system access. Command smbpasswd - a can be used to add a user to the password database under /etc/samba/ for SAMBA authentication. Set up Samba users with the smbpasswd command. Create a smbgroup and add smbuser. Now open main configuration file of Samba. The smb. conf file includes two types of comment lines. The hash symbol (#) is used describes a feature. The semicolon (; ), used to comment out feature (Add ; to disable the feature, remove ; to enable the feature)Note down the value of workgroup directory. It would be same on network for seamless connectivity. Now navigate to Share Definitions section By default Samba automatically share the home directory of the logged- in user which is define in the first four lines of this section. Samba reads home directory information from /etc/passwd file so you need not to specify the home directories path. Close the smb. conf file now and Note down the IP address of server. That's all configurations which we need right now on server. Configure Samba client on Linux system. On Samba client following RPM are requiredsamba- clientsamba- commonsamba- winbind- client. Mount RHEL 6 disk in media folder and move to Package directory. Install RPM if required. Check connectivity from Samba Server. Try to list share from Samba server with smbuser. To verify "Share user home directory" [lab task], list the share from smbuser. Logged in from smbuser. To make sure user have writeable permission also create a test file. Go on server system and logged in from smbuser. We have successfully configured Samba client on Linux client system. Configure window 7 as Samba client system. Open computer properties. Click on change setting. Click on change. Change workgroup name to MYGROUPSystem restart is required, confirm restart. After system restart Check connectivity form Server. Open Network and click on server system. Login from smbuser. User will be logged in his home directory. We have successfully configured window 7 as a client system of Samba. Create a sharedata folder on server. Grant read and write access to public on sharedata folder. Share publicly this folder. Test form linux and window client. On Server create a /sharedata folder. This folder is created from root user so our users will not be able to write in this folder. Change its permission 7. Configure SELinux Boolean . Now open the smb. This share of /sharedata will share a common location where user can download / upload / read the files. In this end of file add following stanza and save the file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |