{"id":3712,"date":"2020-12-11T16:45:39","date_gmt":"2020-12-11T22:45:39","guid":{"rendered":"http:\/\/www.incredigeek.com\/home\/?p=3712"},"modified":"2020-12-11T16:49:50","modified_gmt":"2020-12-11T22:49:50","slug":"how-to-setup-samba-cifs-share-on-fedora-server","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/how-to-setup-samba-cifs-share-on-fedora-server\/","title":{"rendered":"How To Setup Samba\/CIFS Share on Fedora Server"},"content":{"rendered":"\n<p>We are going to setup a Samba\/CIFS share on Fedora Server that we will then access from Windows 10.  <\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Install Samba\/CIFS server packages<\/li><li>Create user to access share<\/li><li>Configure SELinux and firewall<\/li><li>Connect to erver from Windows<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">1. Install Samba\/CIFS Fedora Server Packages<\/h2>\n\n\n\n<p>First we need to install the samba package.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo dnf install samba<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"http:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2020\/12\/image-9.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"248\" src=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2020\/12\/image-9-1024x248.png\" alt=\"Installing SMB on Fedora\" class=\"wp-image-3748\" title=\"Installing SMB on Fedora\" srcset=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2020\/12\/image-9-1024x248.png 1024w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2020\/12\/image-9-300x73.png 300w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2020\/12\/image-9-768x186.png 768w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2020\/12\/image-9-500x121.png 500w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2020\/12\/image-9.png 1216w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>Samba Dependencies <\/figcaption><\/figure>\n\n\n\n<p>Next, lets enable the Samba service so it automatically starts when the server boots up.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">systemctl enable smb nmb\nsystemctl start smb<\/pre>\n\n\n\n<p>nmb is a &#8220;NetBIOS name server that provides NetBIOS over IP naming service to clients&#8221;<br><a href=\"https:\/\/www.samba.org\/samba\/docs\/current\/man-html\/nmbd.8.html\">https:\/\/www.samba.org\/samba\/docs\/current\/man-html\/nmbd.8.html<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Setup Samba\/CIFS User<\/h2>\n\n\n\n<p>We now need a user to connect to the Samba share with.  You can use the commands below to to create a new user.  <\/p>\n\n\n\n<p>pdbedit only configures a current Linux system user for Samba.  You can skip creating a new Linux user, but only if there is one already created that you can use.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo useradd -m sambaUser\nsudo passwd sambaUser\nsudo pdbedit -a sambaUser<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">3. Configure Server SELinux and Firewall Permissions<\/h2>\n\n\n\n<p>Configure SELinux permissions with the following command.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo setsebool -P samba_enable_home_dirs on<\/pre>\n\n\n\n<p>You can also just disable SELinux.  Although it is not necessarily recommended.<br><a href=\"https:\/\/www.incredigeek.com\/home\/how-to-enabledisable-selinux\/\">How To Enable\/Disable SELinux<\/a><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo setsebool -P samba_enable_home_dirs on\nsudo firewall-cmd --add-service=samba --permanent\nsudo firewall-cmd --reload<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">4. Test Samba\/CIFS Share from Windows<\/h2>\n\n\n\n<p>You can now test to see if the share works.  Open up Windows Explorer.  Type in the IP address of the server and connect. <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\\\\ip-address\\sambaUser<\/pre>\n\n\n\n<p>It should prompt you for a login. Enter the user and password you set up.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2020\/12\/image-10.png\"><img loading=\"lazy\" decoding=\"async\" width=\"869\" height=\"410\" src=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2020\/12\/image-10.png\" alt=\"\" class=\"wp-image-3749\" srcset=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2020\/12\/image-10.png 869w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2020\/12\/image-10-300x142.png 300w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2020\/12\/image-10-768x362.png 768w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2020\/12\/image-10-500x236.png 500w\" sizes=\"auto, (max-width: 869px) 100vw, 869px\" \/><\/a><figcaption>Connecting to Fedora Samba\/CIFS server<\/figcaption><\/figure>\n\n\n\n<p>If it loads, then congratulations!  You have successfully setup a Samba\/CIFS Share on Fedora Server.  Create new directories or files or whatever else you need.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2020\/12\/image-11.png\"><img loading=\"lazy\" decoding=\"async\" width=\"868\" height=\"410\" src=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2020\/12\/image-11.png\" alt=\"\" class=\"wp-image-3750\" srcset=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2020\/12\/image-11.png 868w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2020\/12\/image-11-300x142.png 300w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2020\/12\/image-11-768x363.png 768w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2020\/12\/image-11-500x236.png 500w\" sizes=\"auto, (max-width: 868px) 100vw, 868px\" \/><\/a><figcaption>Successfully Connected to Fedora Samba\/CIFS Server<\/figcaption><\/figure>\n\n\n\n<p>Check out the following links for more information about setting up Samba.<\/p>\n\n\n\n<p><a href=\"https:\/\/fedoramagazine.org\/fedora-32-simple-local-file-sharing-with-samba\/\">https:\/\/fedoramagazine.org\/fedora-32-simple-local-file-sharing-with-samba\/<\/a><br><a href=\"https:\/\/jewelhuq.wordpress.com\/2017\/12\/08\/how-to-install-samba-server-in-fedora\/\">https:\/\/jewelhuq.wordpress.com\/2017\/12\/08\/how-to-install-samba-server-in-fedora\/<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/fedoramagazine.org\/fedora-32-simple-local-file-sharing-with-samba\/\">https:\/\/fedoramagazine.org\/fedora-32-simple-local-file-sharing-with-samba\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are going to setup a Samba\/CIFS share on Fedora Server that we will then access from Windows 10. Install Samba\/CIFS server packages Create user to access share Configure SELinux and firewall Connect to erver from Windows 1. Install Samba\/CIFS &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/how-to-setup-samba-cifs-share-on-fedora-server\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24,3],"tags":[379,19,7,613,615,614],"class_list":["post-3712","post","type-post","status-publish","format-standard","hentry","category-fedora-2","category-linux","tag-cifs","tag-fedora","tag-linux-2","tag-samba","tag-share","tag-smb"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3712","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=3712"}],"version-history":[{"count":5,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3712\/revisions"}],"predecessor-version":[{"id":3757,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3712\/revisions\/3757"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=3712"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=3712"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=3712"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}