Permanently Mount Network Drive with Samba | MTRTech Wikia | Fandom (https://mtrtech.fandom.com/rest.php/v1/search) (MTRTech Wikia (en)) (https://mtrtech.fandom.com/api.php?action=rsd) (https://mtrtech.fandom.com/wiki/Permanently_Mount_Network_Drive_with_Samba) (https://www.fandom.com/licensing) (MTRTech Wikia Atom feed) (https://mtrtech.fandom.com/wiki/Special:RecentChanges?feed=atom) (research) Fandom is on a quest for your opinions on upcoming movies! (https://sw2.decipherinc.com/survey/selfserve/419f/250113) We want to hear from you! (https://www.fandom.com/) (Search) (https://createnewwiki-143.fandom.com/Special:CreateNewWiki) Start a Wiki (https://auth.fandom.com/signin?source=mw&redirect=https%3A%2F%2Fmtrtech.fandom.com%2Fwiki%2FPermanently_Mount_Network_Drive_with_Samba) Sign In (https://www.fandom.com/) (https://mtrtech.fandom.com/) MTRTech Wikia Explore Wiki Content Community (Search) (https://mtrtech.fandom.com/f) (Discuss) (Dark Theme) (https://auth.fandom.com/signin?source=mw&redirect=https%3A%2F%2Fmtrtech.fandom.com%2Fwiki%2FPermanently_Mount_Network_Drive_with_Samba) Sign In Explore (https://www.fandom.com/fancentral/home) Fan Central Current Skip to content (https://mtrtech.fandom.com/) (MTRTech Wikia) (https://mtrtech.fandom.com/) MTRTech Wikia 15 pages (https://mtrtech.fandom.com/wiki/Special:Search) (Search) (https://mtrtech.fandom.com/f) (Discuss) (Dark Theme) Explore Wiki Content Community (https://auth.fandom.com/signin?redirect=https%3A%2F%2Fmtrtech.fandom.com%2Fwiki%2FPermanently_Mount_Network_Drive_with_Samba%3Fveaction%3Dedit&uselang=en) in: (https://mtrtech.fandom.com/wiki/Category:Pages_using_deprecated_source_tags) (Category:Pages using deprecated source tags) Pages using deprecated source tags , (https://mtrtech.fandom.com/wiki/Category:Raspberry_Pi) (Category:Raspberry Pi) Raspberry Pi , (https://mtrtech.fandom.com/wiki/Category:Mount) (Category:Mount) Mount , (https://mtrtech.fandom.com/wiki/Category:Samba) (Category:Samba) Samba Permanently Mount Network Drive with Samba (https://auth.fandom.com/signin?redirect=https%3A%2F%2Fmtrtech.fandom.com%2Fwiki%2FPermanently_Mount_Network_Drive_with_Samba%3Fveaction%3Dedit&uselang=en) Sign in to edit (fb:like Facebook Social Plugin) Contents 1 Setting Up a Network Shared Folder 2 Mounting a Network Shared Folder 3 Automount Network Shared Drive on Boot 4 Mounting Windows Share on Linux Setting Up a Network Shared Folder [ (Sign in to edit) (https://auth.fandom.com/signin?redirect=https%3A%2F%2Fmtrtech.fandom.com%2Fwiki%2FPermanently_Mount_Network_Drive_with_Samba%3Fveaction%3Dedit%26section%3D1&uselang=en) ] Most of this information is from (https://help.ubuntu.com/community/How%20to%20Create%20a%20Network%20Share%20Via%20Samba%20Via%20CLI%20(Command-line%20interface/Linux%20Terminal)%20-%20Uncomplicated,%20Simple%20and%20Brief%20Way!) here . First we need to install Samba sudo apt-get install samba sudo apt-get install samba-common-bin Set a password for Samba sudo smbpasswd -a user_name where "user_name" should be replaced with your username (maybe pi?). Let's assume that your the folder you'd like to share is at /home/user_name/shared_folder. We need to edit one file: sudo nano /etc/samba/smb.conf Add the following the end of the file: [shared_folder] path = /home/user_name/shared_folder available = yes valid users = user_name read only = no browseable = yes public = yes writable = yes where again, "user_name" should be replaced with your username. Now restart the Samba server. sudo service samba restart To access your shared folder on another network computer, type smbclient //host_IP/shared_folder This will then prompt for the Samba login credentials. If successful, you'll get a prompt that says smb: \> Type dir to list the contents of the share drive. If this works, you've successfully accessed the shared folder, and your Samba server is working properly. Mounting a Network Shared Folder [ (Sign in to edit) (https://auth.fandom.com/signin?redirect=https%3A%2F%2Fmtrtech.fandom.com%2Fwiki%2FPermanently_Mount_Network_Drive_with_Samba%3Fveaction%3Dedit%26section%3D2&uselang=en) ] First you'll need to create a folder where you'll mount the network share. sudo mkdir /mnt sudo mkdir /mnt/mydrivename You'll also want to change the permissions on the new mount folder sudo chmod 775 /mnt/mydrivename This combination (775) provides read, write, execute permissions to all the current user and group, and only read, execute permissions to the rest of the world. Here's a (http://www.draac.com/chmodchart.html) link showing various chmod configurations. To mount the drive, type sudo mount -t cifs -o username = XXX,password= YYY //host_IP/shared_folder /mnt/mydrivename Here, of course, replace "XXX" with the Samba username, "YYY" with the Samba password, "host_IP" with the IP address (or host name) that's sharing the folder, "shared_folder" with the actual name of the shared folder in the Samba server's /etc/samba/smb.conf, and "/mnt/mydrivename" with the location of the folder where your want to mount the drive. If you're successful, you should be able to browse the contents of the network drive. dir /mnt/mydrivename Automount Network Shared Drive on Boot [ (Sign in to edit) (https://auth.fandom.com/signin?redirect=https%3A%2F%2Fmtrtech.fandom.com%2Fwiki%2FPermanently_Mount_Network_Drive_with_Samba%3Fveaction%3Dedit%26section%3D3&uselang=en) ] To mount the shared folder automatically on boot, we simply need to modify one line of /etc/fstab. sudo nano /etc/fstab At the end of the list, add a line with the following information, separated by tabs: //host_IP/shared_folder /mnt/mydrivename cifs username = XXX,password= YYY 0 0 Where again, you should replace "XXX" with the Samba username, "YYY" with the Samba password, "host_IP" with the IP address (or host name) that's sharing the folder, "shared_folder" with the actual name of the shared folder in the Samba server's /etc/samba/smb.conf, and "/mnt/mydrivename" with the location of the folder where your want to mount the drive. Here's an example of my /etc/fstab file: (https://static.wikia.nocookie.net/mtrtech/images/8/8c/Fstab2.png/revision/latest?cb=20150604044653) When you reboot, you should be able to go directly to your newly-mounted drive. Mounting Windows Share on Linux [ (Sign in to edit) (https://auth.fandom.com/signin?redirect=https%3A%2F%2Fmtrtech.fandom.com%2Fwiki%2FPermanently_Mount_Network_Drive_with_Samba%3Fveaction%3Dedit%26section%3D4&uselang=en) ] To share a Windows folder to a Linux computer, I kindly refer you to this great tutorial: (http://www.howtogeek.com/176471/how-to-share-files-between-windows-and-linux/) http://www.howtogeek.com/176471/how-to-share-files-between-windows-and-linux/ (fb:like Facebook Social Plugin) Categories Community content is available under (https://www.fandom.com/licensing) CC-BY-SA unless otherwise noted. No Comments Yet Be the first to comment on Permanently Mount Network Drive with Samba! (https://www.fandom.com/) (Fandom logo) (Fandom logo) Explore properties (https://www.fandom.com/) Fandom (https://www.muthead.com/) Muthead (https://www.fanatical.com/) Fanatical Follow Us (https://www.facebook.com/getfandom) (https://twitter.com/getfandom) (https://www.youtube.com/fandomentertainment) (https://www.instagram.com/getfandom/) (https://www.linkedin.com/company/157252) Overview (https://www.fandom.com/what-is-fandom) What is Fandom? (https://www.fandom.com/about) About (https://www.fandom.com/careers) Careers (https://www.fandom.com/press) Press (https://www.fandom.com/about#contact) Contact (https://www.fandom.com/terms-of-use) Terms of Use (https://www.fandom.com/privacy-policy) Privacy Policy (https://www.fandom.com/digital-services-act) Digital Services Act (https://community.fandom.com/Sitemap) Global Sitemap (https://mtrtech.fandom.com/wiki/Local_Sitemap) Local Sitemap Do Not Sell My Personal Information Community (https://community.fandom.com/wiki/Community_Central) Community Central (https://fandom.zendesk.com/) Support (https://community.fandom.com/wiki/Help:Contents) Help Advertise (https://about.fandom.com/mediakit) Media Kit (https://about.fandom.com/mediakit#contact) Contact Fandom Apps Take your favorite fandoms with you and never miss a beat. (Fandom App logo) (https://apps.apple.com/us/app/fandom-videos-news-reviews/id1230063803) (Store icon) (https://play.google.com/store/apps/details?id=com.fandom.app&referrer=utm_source%3Dwikia%26utm_medium%3Dglobalfooter) (Store icon) MTRTech Wikia is a FANDOM Lifestyle Community. View Mobile Site (https://bit.ly/FandomIG) Follow on IG (https://bit.ly/TikTokFandom) TikTok (https://bit.ly/FanLabWikiBar) Join Fan Lab (Click here for more information!) (https://bit.ly/WBTrivia2) llenge your friends! (Collapse) (Show) (https://mtrtech.fandom.com/wiki/Special:Search?scope=internal&query=&h=1&isFromHighlightActions=on) Search this wiki (https://mtrtech.fandom.com/wiki/Special:Search?scope=cross-wiki&query=&h=1&isFromHighlightActions=on) Search all wikis (https://reddit.com/submit?url=https%3A%2F%2Fmtrtech.fandom.com%2Fwiki%2FPermanently_Mount_Network_Drive_with_Samba%3Fsh%3Dnull__7507%26m%3D3%26utm_source%3Dreddit%26utm_campaign%3Dh2s&title=) (https://www.facebook.com/dialog/share?app_id=112328095453510&href=https%3A%2F%2Fmtrtech.fandom.com%2Fwiki%2FPermanently_Mount_Network_Drive_with_Samba%3Fsh%3Dnull__7507%26m%3D2%26utm_source%3Dfacebook%26utm_campaign%3Dh2s&redirect_uri=https%3A%2F%2Fmtrtech.fandom.com%2Fwiki%2FPermanently_Mount_Network_Drive_with_Samba"e=&display=page) (https://twitter.com/intent/tweet?text=&url=https%3A%2F%2Fmtrtech.fandom.com%2Fwiki%2FPermanently_Mount_Network_Drive_with_Samba%3Fsh%3Dnull__7507%26m%3D1%26utm_source%3Dtwitter%26utm_campaign%3Dh2s)