{"id":98,"date":"2012-07-29T09:50:43","date_gmt":"2012-07-29T09:50:43","guid":{"rendered":"http:\/\/www.buildingcubes.com\/?p=98"},"modified":"2025-09-04T22:38:15","modified_gmt":"2025-09-04T22:38:15","slug":"setting-up-file-sharing-on-debian-lenny-squeeze-wheezy","status":"publish","type":"post","link":"https:\/\/www.voodoo.business\/blog\/2012\/07\/29\/setting-up-file-sharing-on-debian-lenny-squeeze-wheezy\/","title":{"rendered":"Setting up file sharing on debian lenny \/ squeeze \/ wheezy \/ Buster and Bullseye"},"content":{"rendered":"\n<p>This tutorial was first written for Lenny, then tested on squeeze, wheezy&#8230; up to bullseye<\/p>\n\n\n\n<p><strong>In August 2021, I have revised this for Debian Buster (10) and Debian Bullseye (11).<\/strong><\/p>\n\n\n\n<p>If you have installed Debian Lenny with file sharing (in the lenny installer), you will need to add users to that installation and specify folders that need to be shared, here i will show you how to add a user and share a folder with that user.<\/p>\n\n\n\n<p>If you have not installed file sharing while installing Debian lenny, you need to install them, the easiest way to do that is<\/p>\n\n\n\n<p>apt-get install samba<\/p>\n\n\n\n<p>Or if you like<\/p>\n\n\n\n<p>run the command<\/p>\n\n\n\n<p>aptitude<\/p>\n\n\n\n<p>using the arrow keys and the enter key, expand \u201cTASKS\u201d then place the bar over File Server, then the plus sign to select it (Shift +), right after hit \u201cg\u201d then \u201cg\u201d on your keyboard to install them.<\/p>\n\n\n\n<p>Once done, add the following lines to smb.conf<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[public]\n   comment = Public Folder\n   path = \/public\n   writable = yes\n   guest ok = yes\n   guest only = yes\n   force create mode = 775\n   force directory mode = 775\n[private]\n   comment = Private Folder\n   path = \/private\n   writable = yes\n   guest ok = no\n   valid users = @smbshare\n   force create mode = 770\n   force directory mode = 770\n   inherit permissions = yes<\/pre>\n\n\n\n<p>Now to adding users, from the following 3 commands, After the second and after the third command, you will be asked to chose a password for the user joe<\/p>\n\n\n\n<p>useradd yazeed -m -G users<br>passwd yazeed<br>smbpasswd -a yazeed<\/p>\n\n\n\n<p>Now with this out of the way, you can also edit the following fields in the file \/etc\/samba\/smb.conf<\/p>\n\n\n\n<p>The following need to be edited<\/p>\n\n\n\n<p>netbios name : Should become the name of the computer on the network, in windows, this is the machine\u2019s name<br>hosts allow : If your network is like mine where PCs take IP addresses of the form 192.168.2.x, then this one should be 127. 192.168.2. where 127 is for the local machine, the following part of the IP is the part of the IP that prefixes the IP of all network machines that should be able to access this file server (usually you will change the 2 with a 0 or 1)<br>interfaces : 127.0.0.1\/8 192.168.2.0\/24, like above, if your IP subnet is not 192.168.2.x, change it here (usualy you will change the 2 with a 0 or 1)<br>remote announce : if your subnet does not start with 192.168.2. then change it to your own (usually you will change the 2 with a 0 or 1)<br>remote browse sync : if your subnet does not start with 192.168.2. then change it to your own (usualy you will change the 2 with a 0 or 1)<\/p>\n\n\n\n<p>Now scroll down, you will see a sample folder, edit that to the folder you want to share, and copy it over and over again for any other folders that you want to share, You are done, now you should be able to open those folders from the network.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial was first written for Lenny, then tested on squeeze, wheezy&#8230; up to bullseye In August 2021, I have revised this for Debian Buster (10) and Debian Bullseye (11). If you have installed Debian Lenny with file sharing (in the lenny installer), you will need to add users to that installation and specify folders [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,138],"tags":[],"class_list":["post-98","post","type-post","status-publish","format-standard","hentry","category-linux","category-samba"],"_links":{"self":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/98","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/comments?post=98"}],"version-history":[{"count":5,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/98\/revisions"}],"predecessor-version":[{"id":1588,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/98\/revisions\/1588"}],"wp:attachment":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/media?parent=98"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/categories?post=98"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/tags?post=98"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}