Advertisement
medaganda

how to set up a samba server on beaglebone black

Dec 19th, 2014
710
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.66 KB | None | 0 0
  1. Courtesy of BnRtechnix
  2.  
  3.  
  4. facebook here https://www.facebook.com/bnrtechnix/
  5.  
  6. youtube video here http://youtu.be/VB6Gjfl0Dck
  7.  
  8. twitter here https://twitter.com/bnrtx
  9.  
  10. Also be sure to enter our youtube logo contest for a chance at an awesome prize! see this video for more info!!
  11.  
  12. https://www.youtube.com/watch?v=Be5HyxOjpSU
  13.  
  14. Today I will go over the basics of setting up basic Samba server on the beagle
  15. Bone black
  16.  
  17. While it is quite possible to add accounts and set up secure file storage with samba, this guide will only encompass the basics of samba by using a single public network location.
  18. The drive can only be accessed on your internal network meaning while you are connected to your network.
  19.  
  20.  
  21.  
  22. First we are going to start by flashing the latest version of ubuntu to your beaglebone that I will not go over, for there are many guides on how to do that
  23.  
  24. Lets open up putty and ssh into the admin account
  25.  
  26. Now run a quick sudo apt-get update to be sure your repos are fresh
  27.  
  28. Now, if youve ever used your hdd or other storage device on windows, its most likely in ntfs, while this may mean less than optimal write times (I average 4-mbps) its the most convenient and should be installed regardless if you think you need it or not
  29.  
  30.  
  31. sudo apt-get install ntfs-3g
  32.  
  33.  
  34.  
  35. Now we are going to make the directory samba will use
  36.  
  37. cd ~/    
  38. > mkdir /mnt    
  39. > mkdir /mnt/usbdrive
  40.  
  41. Now we need to check where your drive is, the emmc is at /dev/sda, so we will ignore that
  42. Type
  43.  
  44. ls /dev/sd*
  45.  
  46.  
  47. Now, you should see a sda* mine happens to be sda1 yours most likely will be as well, but if it isn't dont freak out, and be sure to change sda1 to whatever your happens to be
  48.  
  49. Next we will mount your drive to your new folder, BE SURE TO KEEP THIS COMMAND HANDY, AS YOU WILL NEED TO RE-ENTER IT WHENEVER YOU REBOOT OR RECONNECT YOUR DRIVE
  50.  
  51.  
  52. sudo mount /dev/sda1 /mnt/usbdrive
  53.  
  54. Now we are going to need install the samba service
  55.  
  56. sudo apt-get install samba samba-common-bin
  57.  
  58.  
  59. Next we will need to edit the samba config file, feel free to use your favorite text editor or stick to nano, as that's what ill be using
  60.  
  61. sudo nano /etc/samba/smb.conf
  62.  
  63.  
  64. Now we need go add this text at the very bottom
  65.  
  66. under the line that looks like this
  67.  
  68.  
  69. [printers]
  70.    comment = All Printers
  71.    browseable = no
  72.    path = /var/spool/samba
  73.    printable = yes
  74.    guest ok = no
  75.    read only = yes
  76.    create mask = 0700
  77.  
  78.  
  79.  
  80. (this is the text to add in)
  81. [public]
  82.     comment = Public Files
  83.     path = /mnt/usbdrive
  84.     browseable = yes
  85.     writeable = yes
  86.     guest ok = yes
  87.     read only = no
  88.  
  89.  
  90.  
  91. Now open up your network storage on your pc and voila, there's your drive!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement