<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>file sharing Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/file-sharing/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Mon, 23 Nov 2020 23:44:57 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>Configure Samba File share Services with Ubuntu 20.04 LTS</title>
		<link>https://www.osradar.com/configure-samba-file-share-ubuntu/</link>
					<comments>https://www.osradar.com/configure-samba-file-share-ubuntu/#comments</comments>
		
		<dc:creator><![CDATA[rajneesh]]></dc:creator>
		<pubDate>Tue, 24 Nov 2020 03:40:02 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[file sharing]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[ubuntu 20.04]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=25601</guid>

					<description><![CDATA[<p>Here, Today! let&#8217;s discuss samba file share service with Ubuntu 20.04 LTS. If you need to share files between Linux and MS Windows Systems, CIFS or SMB is the way to go. The CIFS protocol is a server-client model. The system that host file to share, need to run Samba server as well.CIFS is an [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/configure-samba-file-share-ubuntu/">Configure Samba File share Services with Ubuntu 20.04 LTS</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Here,  Today! let&#8217;s discuss samba file share service with Ubuntu 20.04 LTS. If you need to share files between Linux and MS Windows Systems, CIFS or SMB is the way to go. The CIFS protocol is a server-client model. The system that host file to share, need to run Samba server as well.CIFS is an extension of SMB or server message block, a protocol developed by Microsoft. In Linux, we can use Samba software to connect CIFS-SMB shares. Also, in a basic set of default samba configurations, there is a list of shares or locations. By default, these locations with few restrictions are available too for the remote client to access.</p>



<p>Samba services how work with Ubuntu 20.04 LTS, this is what we will learn today. Let&#8217;s begin.</p>



<p><strong>What you will learn:</strong></p>



<ol><li>Installing the package, with examples. </li><li>How to configure services. </li><li>Finally, how to mount and use samba shares. </li></ol>



<p><strong>Pre Requisites: </strong></p>



<ol><li>An <a href="https://www.osradar.com/tag/ubuntu" target="_blank" rel="noreferrer noopener">Ubuntu 20.04 LTS</a> Machine.</li><li>Also, MS Windows Desktop. </li><li>Samba packages, of course for Ubuntu.</li><li>Good internet connectivity.  </li></ol>



<p><strong>Get Samba File share services ready:</strong></p>



<p> Let&#8217;s get the Server ready first. Go and download <a href="https://ubuntu.com/download/desktop">Ubuntu OS</a>.  Second, install all required software as well. </p>



<h3><strong>Make required file changes </strong></h3>



<p>Update system</p>



<pre class="wp-block-preformatted">apt update</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="732" height="554" src="//1081754738.rsc.cdn77.org/wp-content/uploads/2020/11/image-29.png" alt="Update Ubuntu System" class="wp-image-25662" srcset="https://www.osradar.com/wp-content/uploads/2020/11/image-29.png 732w, https://www.osradar.com/wp-content/uploads/2020/11/image-29-300x227.png 300w, https://www.osradar.com/wp-content/uploads/2020/11/image-29-696x527.png 696w" sizes="(max-width: 732px) 100vw, 732px" /><figcaption>Update Ubuntu System</figcaption></figure>



<p>Install samba packages</p>



<pre class="wp-block-preformatted">#apt install samba</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="356" src="//1081754738.rsc.cdn77.org/wp-content/uploads/2020/11/image-28-1024x356.png" alt="Install samba packages" class="wp-image-25659" srcset="https://www.osradar.com/wp-content/uploads/2020/11/image-28-1024x356.png 1024w, https://www.osradar.com/wp-content/uploads/2020/11/image-28-300x104.png 300w, https://www.osradar.com/wp-content/uploads/2020/11/image-28-768x267.png 768w, https://www.osradar.com/wp-content/uploads/2020/11/image-28-696x242.png 696w, https://www.osradar.com/wp-content/uploads/2020/11/image-28-1068x372.png 1068w, https://www.osradar.com/wp-content/uploads/2020/11/image-28.png 1103w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Install samba packages</figcaption></figure>



<p>Let&#8217;s have a look is samba services are running proper or not?</p>



<pre class="wp-block-preformatted"># systemctl status smbd</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="624" height="201" src="//1081754738.rsc.cdn77.org/wp-content/uploads/2020/11/image-30.png" alt="check if samba service working fine" class="wp-image-25667" srcset="https://www.osradar.com/wp-content/uploads/2020/11/image-30.png 624w, https://www.osradar.com/wp-content/uploads/2020/11/image-30-300x97.png 300w" sizes="(max-width: 624px) 100vw, 624px" /><figcaption>check if samba service working fine</figcaption></figure>



<p>Let&#8217;s see which files are visible in Samba default directory, will look something like below:</p>



<pre class="wp-block-preformatted">#cd /etc/samba/ &amp;&amp; ls
gdbcommands smb.conf tls<a href="# cd /etc/samba/ &amp;&amp; ls">
</a></pre>



<p>Edit smb.conf file, it is recommended to take a backup of original file first. </p>



<p>Create a shred directory which you would be using to get accessed from MS Windows client, in our example we created folder named as &#8220;sambashare&#8221;. </p>



<p># mkdir /home/ubnt/sambashare</p>



<p>Let&#8217;s edit /etc/samba/smb.conf file, Make required changed as per below, add changes at bottom of the .conf file:</p>



<pre class="wp-block-preformatted"># nano /etc/samba/smb.conf  
[Samba-Windows-Share]  
comment = for windows share
path = /home/ubnt/sambashare
read only = no
browsable = yes</pre>



<p>Press ctrl+o followed by ctrl+x to save and exit from file.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="832" height="706" src="//1081754738.rsc.cdn77.org/wp-content/uploads/2020/11/image-31.png" alt="make changes in smaba.conf file" class="wp-image-25678" srcset="https://www.osradar.com/wp-content/uploads/2020/11/image-31.png 832w, https://www.osradar.com/wp-content/uploads/2020/11/image-31-300x255.png 300w, https://www.osradar.com/wp-content/uploads/2020/11/image-31-768x652.png 768w, https://www.osradar.com/wp-content/uploads/2020/11/image-31-696x591.png 696w" sizes="(max-width: 832px) 100vw, 832px" /><figcaption>make changes in smaba.conf file</figcaption></figure>



<p>Allow samba on firewall and start service.</p>



<pre class="wp-block-preformatted">#ufw allow samba
Rules updated
Rules updated (v6)

#service smbd restart</pre>



<h3>Setup Samba password and access shared folder</h3>



<p>As, samba do not use default user&#8217;s password. Let&#8217;s defile samba password for existing user, in our case user is <strong>ubnt</strong>.</p>



<pre class="wp-block-preformatted"># sudo smbpasswd -a ubnt</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="578" height="107" src="//1081754738.rsc.cdn77.org/wp-content/uploads/2020/11/image-32.png" alt="assign password to samba user" class="wp-image-25694" srcset="https://www.osradar.com/wp-content/uploads/2020/11/image-32.png 578w, https://www.osradar.com/wp-content/uploads/2020/11/image-32-300x56.png 300w" sizes="(max-width: 578px) 100vw, 578px" /><figcaption>assign password to samba user</figcaption></figure>



<p>Change file permissions for shared folder, so that end user can add or remove files, defile permissions as per your need.</p>



<pre class="wp-block-preformatted"># chmod 777 /home/ubnt/sambashare/</pre>



<p>Now, Samba server is ready, lets switch to MS Windows and see. Open Run and provide Samba server IP Address. In our scenario that IP address was 192.168.1.239.  </p>



<figure class="wp-block-image size-large"><img loading="lazy" width="449" height="261" src="//1081754738.rsc.cdn77.org/wp-content/uploads/2020/11/image-33.png" alt="open run to browse shared folder" class="wp-image-25696" srcset="https://www.osradar.com/wp-content/uploads/2020/11/image-33.png 449w, https://www.osradar.com/wp-content/uploads/2020/11/image-33-300x174.png 300w" sizes="(max-width: 449px) 100vw, 449px" /><figcaption>open run to browse shared folder</figcaption></figure>



<p>press enter, shared folder creds which we have created in previous step is visible:</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="462" height="322" src="//1081754738.rsc.cdn77.org/wp-content/uploads/2020/11/image-34.png" alt="You can see shared folder for samba" class="wp-image-25697" srcset="https://www.osradar.com/wp-content/uploads/2020/11/image-34.png 462w, https://www.osradar.com/wp-content/uploads/2020/11/image-34-300x209.png 300w" sizes="(max-width: 462px) 100vw, 462px" /><figcaption>You can see shared folder for samba</figcaption></figure>



<p> </p>



<p>Give user id and password created recently with <strong>smbpasswd</strong> command, in my scenario first attempt login didn&#8217;t work, but don&#8217;t worry, give another try. it will work. </p>



<figure class="wp-block-image size-large"><img loading="lazy" width="613" height="418" src="//1081754738.rsc.cdn77.org/wp-content/uploads/2020/11/image-36.png" alt="give user id and password" class="wp-image-25709" srcset="https://www.osradar.com/wp-content/uploads/2020/11/image-36.png 613w, https://www.osradar.com/wp-content/uploads/2020/11/image-36-300x205.png 300w, https://www.osradar.com/wp-content/uploads/2020/11/image-36-218x150.png 218w" sizes="(max-width: 613px) 100vw, 613px" /><figcaption>give user id and password</figcaption></figure>



<p></p>



<p>Lets try to create folder or file and see, whether that file is visible in Linux Machine or not. I have created <em>Test_Folder</em> and <em>Test_File.</em> </p>



<figure class="wp-block-image size-large"><img loading="lazy" width="857" height="452" src="//1081754738.rsc.cdn77.org/wp-content/uploads/2020/11/image-37.png" alt="try to create folder and files" class="wp-image-25711" srcset="https://www.osradar.com/wp-content/uploads/2020/11/image-37.png 857w, https://www.osradar.com/wp-content/uploads/2020/11/image-37-300x158.png 300w, https://www.osradar.com/wp-content/uploads/2020/11/image-37-768x405.png 768w, https://www.osradar.com/wp-content/uploads/2020/11/image-37-696x367.png 696w" sizes="(max-width: 857px) 100vw, 857px" /><figcaption>try to create folder and files</figcaption></figure>



<p>Lets have a look in Ubuntu Samba server, if these files are visible or not. </p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1001" height="615" src="//1081754738.rsc.cdn77.org/wp-content/uploads/2020/11/image-38.png" alt="let's have a look in samba server" class="wp-image-25712" srcset="https://www.osradar.com/wp-content/uploads/2020/11/image-38.png 1001w, https://www.osradar.com/wp-content/uploads/2020/11/image-38-300x184.png 300w, https://www.osradar.com/wp-content/uploads/2020/11/image-38-768x472.png 768w, https://www.osradar.com/wp-content/uploads/2020/11/image-38-696x428.png 696w" sizes="(max-width: 1001px) 100vw, 1001px" /><figcaption>let&#8217;s have a look in samba server</figcaption></figure>



<p>Bingo! we have created and tested samba server successfully. Give a try!! </p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/configure-samba-file-share-ubuntu/">Configure Samba File share Services with Ubuntu 20.04 LTS</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/configure-samba-file-share-ubuntu/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>Install and Configure Samba on RHEL and Centos 8</title>
		<link>https://www.osradar.com/install-and-configure-samba-on-rhel-and-centos-8/</link>
					<comments>https://www.osradar.com/install-and-configure-samba-on-rhel-and-centos-8/#comments</comments>
		
		<dc:creator><![CDATA[Muhammad Nabeel]]></dc:creator>
		<pubDate>Sat, 18 May 2019 11:37:07 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[file sharing]]></category>
		<category><![CDATA[samba]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=12068</guid>

					<description><![CDATA[<p>Samba is a file sharing software which is sued to shared files between same and different operating systems. Today, You will learn that how to install and configure Samba share on RHEL 8 and CentOS 8 between other Linux and Windows systems. Installation of Samba login to your server from root user. Use below command [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-and-configure-samba-on-rhel-and-centos-8/">Install and Configure Samba on RHEL and Centos 8</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Samba is a file sharing software which is sued to shared files between same and different operating systems. Today, You will learn that how to install and configure Samba share on RHEL 8 and CentOS 8 between other Linux and Windows systems.</p>
<h3><strong>Installation of Samba</strong></h3>
<p>login to your server from root user.</p>
<p>Use below command to install samba with necessary packages.</p>
<pre>dnf install samba samba-common samba-client -y</pre>
<p><img loading="lazy" class="alignnone wp-image-12073" src="https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-38-55-300x180.png" alt="" width="672" height="403" srcset="https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-38-55-300x180.png 300w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-38-55-768x461.png 768w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-38-55-1024x614.png 1024w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-38-55-696x418.png 696w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-38-55-1068x641.png 1068w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-38-55-700x420.png 700w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-38-55.png 1280w" sizes="(max-width: 672px) 100vw, 672px" /></p>
<p>Before configurations, make sure Windows machine is in same workgroup.<br />
open the cmd prompt in Windows machine and run the following command</p>
<pre>&gt; net config workstation</pre>
<p><img loading="lazy" class="alignnone wp-image-12074" src="https://www.osradar.com/wp-content/uploads/2019/05/2-300x193.jpg" alt="" width="675" height="434" srcset="https://www.osradar.com/wp-content/uploads/2019/05/2-300x193.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/05/2-653x420.jpg 653w, https://www.osradar.com/wp-content/uploads/2019/05/2.jpg 676w" sizes="(max-width: 675px) 100vw, 675px" /></p>
<h3><strong>Samba Configuration</strong></h3>
<p>before configuration rename samba default configuration file /etc/samba/smb.conf as backup.</p>
<pre># mv /etc/samba/smb.conf /etc/samba/smb.conf.default</pre>
<p><img loading="lazy" class="alignnone wp-image-12075" src="https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-40-05-300x51.png" alt="" width="671" height="114" srcset="https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-40-05-300x51.png 300w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-40-05-768x130.png 768w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-40-05-1024x173.png 1024w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-40-05-696x117.png 696w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-40-05-1068x180.png 1068w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-40-05.png 1280w" sizes="(max-width: 671px) 100vw, 671px" /></p>
<h3><strong>Samba Anonymous File Sharing</strong></h3>
<p>Now create a shared folder on the server where all files/folders will be stored and set appropriate permissions on it and allow SELINUX for the samba configuration.</p>
<p>Run below commands</p>
<pre>mkdir -p /srv/samba/anonymous
chmod -R 0755 /srv/samba/anonymous
chown -R nobody:nobody /srv/samba/anonymous
chcon -t samba_share_t /srv/samba/anonymous</pre>
<p><img loading="lazy" class="alignnone wp-image-12076" src="https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-41-10-300x82.png" alt="" width="677" height="185" srcset="https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-41-10-300x82.png 300w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-41-10-768x211.png 768w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-41-10-1024x281.png 1024w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-41-10-696x191.png 696w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-41-10-1068x293.png 1068w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-41-10.png 1280w" sizes="(max-width: 677px) 100vw, 677px" /></p>
<p>Now make following changes in new samba configuration file.</p>
<pre># vi /etc/samba/smb.conf</pre>
<pre>[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = rhel8
security = user
map to guest = bad user
dns proxy = no

[Anonymous]
path = /srv/samba/anonymous
browsable =yes
writable = yes
guest ok = yes
read only = no</pre>
<p><img loading="lazy" class="alignnone wp-image-12079" src="https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-48-57-1-300x180.png" alt="" width="673" height="404" srcset="https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-48-57-1-300x180.png 300w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-48-57-1-768x461.png 768w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-48-57-1-1024x614.png 1024w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-48-57-1-696x418.png 696w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-48-57-1-1068x641.png 1068w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-48-57-1-700x420.png 700w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-48-57-1.png 1280w" sizes="(max-width: 673px) 100vw, 673px" /></p>
<p>Run below commant to verify samba configurations</p>
<pre>testparm</pre>
<p><img loading="lazy" class="alignnone wp-image-12080" src="https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-49-48-300x180.png" alt="" width="672" height="403" srcset="https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-49-48-300x180.png 300w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-49-48-768x461.png 768w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-49-48-1024x614.png 1024w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-49-48-696x418.png 696w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-49-48-1068x641.png 1068w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-49-48-700x420.png 700w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-49-48.png 1280w" sizes="(max-width: 672px) 100vw, 672px" /></p>
<h3><strong>Start and Add Samba Services in firewall</strong></h3>
<p>Run below command to add samba service in firewall</p>
<pre>firewall-cmd --permanent --add-service=samba
firewall-cmd --reload</pre>
<p><img loading="lazy" class="alignnone wp-image-12081" src="https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-49-49-300x89.png" alt="" width="674" height="200" srcset="https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-49-49-300x89.png 300w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-49-49-768x227.png 768w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-49-49-1024x302.png 1024w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-49-49-696x206.png 696w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-49-49-1068x315.png 1068w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-49-49.png 1280w" sizes="(max-width: 674px) 100vw, 674px" /></p>
<h3><strong>start and enable samba services</strong></h3>
<pre>systemctl start smb.service
systemctl enable smb.service
systemctl start nmb.service
systemctl enable nmb.service</pre>
<p><img loading="lazy" class="alignnone wp-image-12082" src="https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-52-15-300x101.png" alt="" width="677" height="228" srcset="https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-52-15-300x101.png 300w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-52-15-768x259.png 768w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-52-15-1024x346.png 1024w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-52-15-696x235.png 696w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-52-15-1068x360.png 1068w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-52-15-1244x420.png 1244w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-13-15-52-15.png 1280w" sizes="(max-width: 677px) 100vw, 677px" /></p>
<h3><strong>Access Samba Share Path</strong></h3>
<p>Now open Run prompt by pressing <strong>win + r</strong> key on your keyboard then type <strong>\\rhel8</strong> and press <strong>enter</strong> key.</p>
<p><img loading="lazy" class="alignnone wp-image-12083" src="https://www.osradar.com/wp-content/uploads/2019/05/8-300x155.jpg" alt="" width="345" height="178" srcset="https://www.osradar.com/wp-content/uploads/2019/05/8-300x155.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/05/8.jpg 400w" sizes="(max-width: 345px) 100vw, 345px" /></p>
<p>You will see Anonymous folder like below</p>
<p><img loading="lazy" class="alignnone wp-image-12084" src="https://www.osradar.com/wp-content/uploads/2019/05/9-300x153.jpg" alt="" width="463" height="236" srcset="https://www.osradar.com/wp-content/uploads/2019/05/9-300x153.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/05/9-768x391.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/05/9-696x354.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/05/9-826x420.jpg 826w, https://www.osradar.com/wp-content/uploads/2019/05/9.jpg 859w" sizes="(max-width: 463px) 100vw, 463px" /></p>
<p>Now you can add files/folders in this folder to share with other users.</p>
<p><img loading="lazy" class="alignnone wp-image-12085" src="https://www.osradar.com/wp-content/uploads/2019/05/10-300x143.jpg" alt="" width="556" height="265" srcset="https://www.osradar.com/wp-content/uploads/2019/05/10-300x143.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/05/10-768x366.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/05/10-696x332.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/05/10-882x420.jpg 882w, https://www.osradar.com/wp-content/uploads/2019/05/10.jpg 909w" sizes="(max-width: 556px) 100vw, 556px" /></p>
<h3><strong>Create samba secure share </strong></h3>
<p>Create a secured share on the server where only allowed user can login and set appropriate permissions on it and allow SELINUX for the samba configuration.</p>
<p><strong>Create group for samba users</strong></p>
<pre>groupadd securedgroup</pre>
<p><strong>Create samba user with securedgroup</strong></p>
<pre>useradd demo -G securedgroup</pre>
<p><img loading="lazy" class="alignnone wp-image-12172" src="https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-41-21-300x169.png" alt="" width="681" height="384" srcset="https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-41-21-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-41-21-768x434.png 768w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-41-21-1024x578.png 1024w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-41-21-696x393.png 696w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-41-21-1068x603.png 1068w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-41-21-744x420.png 744w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-41-21.png 1360w" sizes="(max-width: 681px) 100vw, 681px" /></p>
<p><strong>Now create secure share folder for samba users and set necessary permissions.</strong></p>
<pre>mkdir -p /srv/samba/secured
chmod -R 0770 /srv/samba/secured
chcon -t samba_share_t /srv/samba/secured
chown -R root:securedgroup /srv/samba/secured/</pre>
<p><img loading="lazy" class="alignnone wp-image-12173" src="https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-37-02-300x46.png" alt="" width="685" height="105" srcset="https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-37-02-300x46.png 300w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-37-02-768x119.png 768w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-37-02-1024x158.png 1024w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-37-02-696x107.png 696w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-37-02-1068x165.png 1068w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-37-02.png 1360w" sizes="(max-width: 685px) 100vw, 685px" /></p>
<p><img loading="lazy" class="alignnone wp-image-12174" src="https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-44-54-300x42.png" alt="" width="686" height="96" srcset="https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-44-54-300x42.png 300w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-44-54-768x107.png 768w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-44-54-1024x142.png 1024w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-44-54-696x97.png 696w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-44-54-1068x148.png 1068w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-44-54.png 1360w" sizes="(max-width: 686px) 100vw, 686px" /></p>
<p><strong>Add user to samba database and set its password</strong></p>
<pre>smbpasswd -a demo</pre>
<p><strong><br />
Now add following lines in samba configuration file.</strong></p>
<pre>vi /etc/samba/smb.conf</pre>
<pre>[secured]
path = /srv/samba/secured
valid users = @securedgroup
guest ok = no
writable = yes
browsable = yes</pre>
<p><img loading="lazy" class="alignnone wp-image-12176" src="https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-47-47-300x169.jpg" alt="" width="680" height="383" srcset="https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-47-47-300x169.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-47-47-768x434.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-47-47-1024x578.jpg 1024w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-47-47-696x393.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-47-47-1068x603.jpg 1068w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-47-47-744x420.jpg 744w, https://www.osradar.com/wp-content/uploads/2019/05/RHEL-8-VM-2019-05-16-19-47-47.jpg 1360w" sizes="(max-width: 680px) 100vw, 680px" /></p>
<p><strong>Then restart samba</strong></p>
<pre>systemctl restart smb.service</pre>
<p><strong>Now access secured share from Windows</strong></p>
<p>Now you can access the RHEL 8 secured folder from windows, open Run prompt by pressing win + r key on your keyboard<br />
Then type <strong>\\SAMBA-SERVER-IP</strong> and press enter key.</p>
<p>My samba server IP is 192.168.130.152 so i will use <strong>\\192.168.130.152<br />
<img loading="lazy" class="alignnone wp-image-12178" src="https://www.osradar.com/wp-content/uploads/2019/05/Capture22-300x156.jpg" alt="" width="613" height="319" srcset="https://www.osradar.com/wp-content/uploads/2019/05/Capture22-300x156.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/05/Capture22.jpg 399w" sizes="(max-width: 613px) 100vw, 613px" /><br />
</strong></p>
<p>Now Click on secured folder and it will ask you to enter samba user login details to access the folder.<br />
<img loading="lazy" class="alignnone wp-image-12180" src="https://www.osradar.com/wp-content/uploads/2019/05/Capture33-300x167.jpg" alt="" width="665" height="370" srcset="https://www.osradar.com/wp-content/uploads/2019/05/Capture33-300x167.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/05/Capture33-768x428.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/05/Capture33-1024x571.jpg 1024w, https://www.osradar.com/wp-content/uploads/2019/05/Capture33-696x388.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/05/Capture33-1068x595.jpg 1068w, https://www.osradar.com/wp-content/uploads/2019/05/Capture33-753x420.jpg 753w, https://www.osradar.com/wp-content/uploads/2019/05/Capture33.jpg 1103w" sizes="(max-width: 665px) 100vw, 665px" /></p>
<p>You will see secured folder like below, Now you can add files/folders in this folder to share with other samba users.</p>
<p><img loading="lazy" class="alignnone wp-image-12179" src="https://www.osradar.com/wp-content/uploads/2019/05/Capture11-1-300x97.jpg" alt="" width="615" height="199" srcset="https://www.osradar.com/wp-content/uploads/2019/05/Capture11-1-300x97.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/05/Capture11-1-768x249.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/05/Capture11-1-696x225.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/05/Capture11-1.jpg 961w" sizes="(max-width: 615px) 100vw, 615px" /></p>
<p>&nbsp;</p>
<h3><strong>Mount and access Samba secure share from Linux</strong></h3>
<p>I am going to use <strong>Ubuntu</strong> to access RHEL 8 Samba secure share.<br />
Login to Ubuntu, open terminal and run below command.</p>
<p><strong>First install samba client</strong></p>
<pre>apt-get install samba-client -y</pre>
<p><strong>Now use below command to verify Samba Share is accessible.</strong></p>
<pre>smbclient --user=demo -L //192.168.130.152</pre>
<p><img loading="lazy" class="alignnone wp-image-12181" src="https://www.osradar.com/wp-content/uploads/2019/05/Ubuntu-default-2019-05-16-22-43-18-300x225.png" alt="" width="679" height="509" srcset="https://www.osradar.com/wp-content/uploads/2019/05/Ubuntu-default-2019-05-16-22-43-18-300x225.png 300w, https://www.osradar.com/wp-content/uploads/2019/05/Ubuntu-default-2019-05-16-22-43-18-768x576.png 768w, https://www.osradar.com/wp-content/uploads/2019/05/Ubuntu-default-2019-05-16-22-43-18-80x60.png 80w, https://www.osradar.com/wp-content/uploads/2019/05/Ubuntu-default-2019-05-16-22-43-18-265x198.png 265w, https://www.osradar.com/wp-content/uploads/2019/05/Ubuntu-default-2019-05-16-22-43-18-696x522.png 696w, https://www.osradar.com/wp-content/uploads/2019/05/Ubuntu-default-2019-05-16-22-43-18-560x420.png 560w, https://www.osradar.com/wp-content/uploads/2019/05/Ubuntu-default-2019-05-16-22-43-18.png 800w" sizes="(max-width: 679px) 100vw, 679px" /></p>
<p>Command Syntax:<br />
smbclient &#8211;user=samba-username -L //Samba-Server-IP</p>
<p><strong>Access/Mount Samba share</strong></p>
<pre>smbclient //192.168.130.152/secured -U demo</pre>
<p><img loading="lazy" class="alignnone wp-image-12182" src="https://www.osradar.com/wp-content/uploads/2019/05/Ubuntu-default-2019-05-16-22-45-30-300x225.png" alt="" width="672" height="504" srcset="https://www.osradar.com/wp-content/uploads/2019/05/Ubuntu-default-2019-05-16-22-45-30-300x225.png 300w, https://www.osradar.com/wp-content/uploads/2019/05/Ubuntu-default-2019-05-16-22-45-30-768x576.png 768w, https://www.osradar.com/wp-content/uploads/2019/05/Ubuntu-default-2019-05-16-22-45-30-80x60.png 80w, https://www.osradar.com/wp-content/uploads/2019/05/Ubuntu-default-2019-05-16-22-45-30-265x198.png 265w, https://www.osradar.com/wp-content/uploads/2019/05/Ubuntu-default-2019-05-16-22-45-30-696x522.png 696w, https://www.osradar.com/wp-content/uploads/2019/05/Ubuntu-default-2019-05-16-22-45-30-560x420.png 560w, https://www.osradar.com/wp-content/uploads/2019/05/Ubuntu-default-2019-05-16-22-45-30.png 800w" sizes="(max-width: 672px) 100vw, 672px" /></p>
<p>Command Syntax:<br />
smbclient //Samba-Server-IP/share-name -U samba-username</p>
<p>That&#8217;s it you have accesses the samba shared from Windows and Linux successfully.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-and-configure-samba-on-rhel-and-centos-8/">Install and Configure Samba on RHEL and Centos 8</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-and-configure-samba-on-rhel-and-centos-8/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
