{"id":813,"date":"2019-01-12T13:00:33","date_gmt":"2019-01-12T13:00:33","guid":{"rendered":"http:\/\/chewett.co.uk\/blog\/?p=813"},"modified":"2018-12-31T22:04:51","modified_gmt":"2018-12-31T22:04:51","slug":"setting-up-a-samba-share-on-fedora-26","status":"publish","type":"post","link":"https:\/\/chewett.co.uk\/blog\/813\/setting-up-a-samba-share-on-fedora-26\/","title":{"rendered":"Setting up a Samba share on Fedora 26"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"678\" height=\"254\" data-attachment-id=\"1904\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/813\/setting-up-a-samba-share-on-fedora-26\/setting_up_samba_fc26\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/setting_up_samba_fc26.jpg?fit=800%2C300&amp;ssl=1\" data-orig-size=\"800,300\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"setting_up_samba_fc26\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/setting_up_samba_fc26.jpg?fit=300%2C113&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/setting_up_samba_fc26.jpg?fit=678%2C254&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/setting_up_samba_fc26.jpg?resize=678%2C254\" alt=\"\" class=\"wp-image-1904\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/setting_up_samba_fc26.jpg?w=800&amp;ssl=1 800w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/setting_up_samba_fc26.jpg?resize=300%2C113&amp;ssl=1 300w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/setting_up_samba_fc26.jpg?resize=768%2C288&amp;ssl=1 768w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/setting_up_samba_fc26.jpg?resize=50%2C19&amp;ssl=1 50w\" sizes=\"auto, (max-width: 678px) 100vw, 678px\" \/><\/figure>\n\n\n\n<p>This post goes through the process of setting up a Windows Samba share on Fedora 26. This will let me access folders on the Fedora machine using windows explorer.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Installing the necessary&nbsp;programs<\/h2>\n\n\n\n<p>To set up samba on Fedora we need to install some programs first. These are samba and samba-client. For good measure once these have been installed we will reboot the machine. This can be done as follows.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo&nbsp;dnf install samba samba-client<br>sudo reboot<\/pre>\n\n\n\n<p>Once the machine has rebooted we are ready to configure samba<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Configuring Samba to share folders<\/h2>\n\n\n\n<p>The configuration file for Samba is located at&nbsp;<code>\/etc\/samba\/smb.conf<\/code>. One of the changes I am going to make is to change the workgroup. Here I am going to change it to the workgroup used at home, &#8220;BUNKER&#8221;.<\/p>\n\n\n\n<p>I am going to add one new share with the below template.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[WD1TB]<br> comment = Public folder<br> path = \/home\/public<br> valid users = @samba<br> force group = samba<br> create mask = 0660<br> directory mask = 0771<br> read only = no<\/pre>\n\n\n\n<p>Here I name the folder &#8220;Public folder&#8221; and add the path to the folder \/home\/public\/<\/p>\n\n\n\n<p>I set the users that are allowed to access the share to @samba. This means that all users who have the samba group are allowed to access this share. By forcing the group to samba all users accessing the folders will be doing so as the samba user. This can resolve a number of permission issues.<\/p>\n\n\n\n<p>The create mask and directory\u00a0mask are set up so that any files or directories are created with the given mask.<\/p>\n\n\n\n<p>Finally setting read only&nbsp;can allow you to make read only shares. For this case I want to be able to write to the folder.<\/p>\n\n\n\n<p>Now samba has been configured I need to ensure it always runs when the machine turns on. I can do this with the following two commands.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl enable smb nmb<br>sudo systemctl start smb nmb<\/pre>\n\n\n\n<p>The first enables samba so that it will start on every system boot. The second starts it for this session.<\/p>\n\n\n\n<p>In addition to starting samba we need to add a service rule to allow samba through the default Fedora firewall. The following two commands add samba as a permitted service and reloads the rules to allow it through.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">firewall-cmd --add-service=samba --permanent\nfirewall-cmd --reload<\/pre>\n\n\n\n<p>Now samba is configured I need to give my user access to it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setting up samba to access the folders<\/h2>\n\n\n\n<p>Now that I have configured samba I need to set it up for my user. Since I have configured it to work for those users with the samba group I need to create this group and assign it to my user.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo groupadd samba\nsudo usermod -aG samba chewett<\/pre>\n\n\n\n<p>Once the group has been added I need to set my samba password. This can be done for any user by running the following command.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">smbpasswd -a chewett<\/pre>\n\n\n\n<p>Once this is done my user chewett will be able to access samba.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post goes through the process of setting up a Windows Samba share on Fedora 26. This will let me access folders on the Fedora machine using windows explorer.<\/p>\n","protected":false},"author":1,"featured_media":1905,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Today I am talking about setting up a #Samba share on #Fedora 26","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5],"tags":[41,190,115],"class_list":["post-813","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-informational","tag-fedora","tag-fedora-26","tag-samba"],"wppr_data":{"cwp_meta_box_check":"No"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/setting_up_samba_fc26-1.jpg?fit=800%2C800&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p2toWX-d7","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":484,"url":"https:\/\/chewett.co.uk\/blog\/484\/virtualbox-guest-additions-fedora\/","url_meta":{"origin":813,"position":0},"title":"Virtualbox Guest additions on Fedora","author":"Chewett","date":"July 26, 2017","format":false,"excerpt":"This post describes how to install virtualbox guest additions on a Fedora virtual machine. Virtualbox guest additions adds a couple of features to running Fedora on virtualbox. Some of the useful features are shared folders, mouse pointer support, shared clipboard and better video driver support. The primary reason I install\u2026","rel":"","context":"In &quot;Informational&quot;","block_context":{"text":"Informational","link":"https:\/\/chewett.co.uk\/blog\/category\/informational\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/07\/fedora_on_virtualbox.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/07\/fedora_on_virtualbox.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/07\/fedora_on_virtualbox.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/07\/fedora_on_virtualbox.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1281,"url":"https:\/\/chewett.co.uk\/blog\/1281\/how-to-install-redmine-on-fedora-28\/","url_meta":{"origin":813,"position":1},"title":"How to Install Redmine on Fedora 28","author":"Chewett","date":"July 4, 2018","format":false,"excerpt":"In this post I talk about the additional steps needed to install Redmine on Fedora 28. Pre-installation\u00a0steps required for Fedora 28 To install Redmine\u00a0on Fedora 28 you will need to install a number of packages first. These are required for the\u00a0ruby gem files to be compiled and installed. To quickly\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/chewett.co.uk\/blog\/category\/software\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/installing_redmine_on_fedora.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/installing_redmine_on_fedora.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/installing_redmine_on_fedora.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/installing_redmine_on_fedora.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":507,"url":"https:\/\/chewett.co.uk\/blog\/507\/fixing-black-screen-nvidia-graphics-card-fedora\/","url_meta":{"origin":813,"position":2},"title":"Fixing black screen with Nvidia graphics card on fedora","author":"Chewett","date":"July 29, 2017","format":false,"excerpt":"On my fedora system I found that after upgrading the kernel\u00a0the graphics drivers wouldnt work. My machine would boot into the operating\u00a0system perfectly fine but would have no image on the screen. This post describes how I fixed this issue. The symptoms of the black screen on Fedora Initially I\u2026","rel":"","context":"In &quot;Fixes&quot;","block_context":{"text":"Fixes","link":"https:\/\/chewett.co.uk\/blog\/category\/fixes\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/07\/black_screen_fedora_nvidia.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/07\/black_screen_fedora_nvidia.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/07\/black_screen_fedora_nvidia.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/07\/black_screen_fedora_nvidia.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":183,"url":"https:\/\/chewett.co.uk\/blog\/183\/install-virtualbox-guest-additions-fedora-21-xfce\/","url_meta":{"origin":813,"position":3},"title":"Install Virtualbox guest additions on Fedora 21 XFCE","author":"Chewett","date":"February 8, 2015","format":false,"excerpt":"Installing via the normal route didn't work and meant I couldn't easily resize the screen. Doing the below allowed me to use the resize easily. Install rpmfusion on fedora run `sudo yum install\u00a0akmod-VirtualBox\u00a0VirtualBox-guest` run `cd\u00a0\/usr\/src\/akmods` run `sudo rpm -ivh VirtualBox-*.rpm` Once this was installed, rebooting will give you access to\u2026","rel":"","context":"In &quot;Fixes&quot;","block_context":{"text":"Fixes","link":"https:\/\/chewett.co.uk\/blog\/category\/fixes\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1226,"url":"https:\/\/chewett.co.uk\/blog\/1226\/changing-boot-order-with-grub-on-fedora\/","url_meta":{"origin":813,"position":4},"title":"Changing boot order with GRUB on Fedora","author":"Chewett","date":"June 6, 2018","format":false,"excerpt":"In this post I talk about how you can change the default selected OS and reorder the boot list in GRUB for Fedora. The Default GRUB ordering By default when the GRUB bootloader is installed it will search for all installed operating systems. Their default ordering is based on the\u2026","rel":"","context":"In &quot;Fixes&quot;","block_context":{"text":"Fixes","link":"https:\/\/chewett.co.uk\/blog\/category\/fixes\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/altering_boot_order_grub_fedora.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/altering_boot_order_grub_fedora.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/altering_boot_order_grub_fedora.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/06\/altering_boot_order_grub_fedora.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":122,"url":"https:\/\/chewett.co.uk\/blog\/122\/using-nvidia-optimus-on-fedora\/","url_meta":{"origin":813,"position":5},"title":"Using Nvidia Optimus on Fedora","author":"Chewett","date":"March 6, 2013","format":false,"excerpt":"If your computer is recent and has an i3\/i5\/i7 intel core and a Nvidia graphics card it likely uses Optimus technology. This smart piece of software turns off the power-hungry Nvidia graphics card and runs most programs on the integrated intel graphics chip. In laptops this can save a lot\u2026","rel":"","context":"In &quot;Fixes&quot;","block_context":{"text":"Fixes","link":"https:\/\/chewett.co.uk\/blog\/category\/fixes\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/813","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=813"}],"version-history":[{"count":6,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/813\/revisions"}],"predecessor-version":[{"id":1907,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/813\/revisions\/1907"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media\/1905"}],"wp:attachment":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=813"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=813"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=813"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}