Page 119 - RHEL8 BOOK
P. 119

1.  Installing through yum.
             [root@sun ~]# yum install samba

             2.  Check the installed Packages.
             [root@sun ~]# rpm –qa | grep samba
             [root@sun ~]# yum list installed | grep samba

             3.  Installing through rpm.
             [root@sun pub]# cd /var/ftp/pub/
             [root@sun pub]# rpm -ivh samba* --force --aid

             4.  Create the resources (Files/folders) on Samba server.
             [root@sun ~]#mkdir /var/IDESIGN
             [root@sun ~]#chmod 777 /var/IDESIGN
             [root@sun ~]#cd /var/IDESIGN
             [root@sunIDESIGN]#touch fa.txt fb.txt music.mp3
             [root@sunIDESIGN]#ls

             5.  Change the SELinux file context so that it can be shared
             [root@sun ~]#chcon -t samba_share_t /samba_share/
             This command changes the SELinux security context on the directory to “samba_share_t” which will
             allow the contents of the directory to be shared via samba. Users wont be able to access the share if
             the SELinux context is not changed.

             6.  Edit the main configuration File (RHEL7)
                 [public]
                     315    comment = This is Samba Server
                     316    path = /var/IDESIGN
                     317    valid users = tom joy root
                     318    public = no
                     319    writable = yes
                     320    printable = no
                     321    browseable = yes
             7.  Edit the main configuration File (RHEL5)
                 [myshare]
                     266    comment = This is Samba Server
                     267    path = /var/IDESIGN
                     268    valid users = tom joy root
                     269    public = no
                     270    writable = yes
                     271    printable = no
                     272    browseable = yes
                     273    create mask = 0765






                                                       S. Pradhan
                             (MCA, MBA-IT, BCA, CCNA, MCSA 2012, RHCE, ETHICAL HACKING)
                                             Email Id:-spradhan.iiht@gmail.com
                                                           119
   114   115   116   117   118   119   120   121   122   123   124