Discussion

Enable Samba on Banana Pi

4 13086
FishX  
Post Last Edited by FishX at 2014-7-22 17:57

1)Install Samba Server & add user
  1. sudo apt-get install samba samba-common-bin
  2. sudo smbpasswd -a bananapi
Copy the Code
thne input the password for twice
2)Modify the config file
  1. service samba stop
  2. nano /etc/samba/smb.conf
Copy the Code

Press Ctrl+K to delete all lines,then paste below lines to the config file


  1. [global]
  2.     workgroup = WORKGROUP
  3.     #usershare allow guests = yes
  4.     #security=share
  5.     security=user
  6.     follow symlinks = yes
  7.     wide links = no
  8.     unix extensions = no
  9.     lock directory = /var/cache/samba
  10. [BananaPi]
  11.     browsable = yes
  12.     read only = no
  13.     #guest ok = yes
  14.     valid users = bananapi
  15.     path = /home/bananapi
  16. [devices]
  17.     browsable = yes
  18.     read only = no
  19.     #guest ok = yes
  20.     valid users = bananapi
  21.     path = /media
  22.     force user = root
Copy the Code


3)Restart samba server
  1. service samba start
Copy the Code


4)test
press win+r under windows then type this line to test the samba server
  1. \\Your bnnpi's ip
Copy the Code
Wonder  
Wonderful Job

Thank you, Fishx

Roy360  
Edited by Roy360 at Mon May 25, 2015 23:58

Thanks for this, but what if I want guest log in only?

I don't want a password for LAN access

p.s what kind of speed are you getting on your server

EDIT: nvm got it.

needed
guest account = root under global

swipon  
For only guest access set guest to root is not the best way for security reason.

Is better to change directory permission:
chmod -R 777 /media

And set correctly the smb.conf:

in global:
  1. security=share
Copy the Code


in directory options:

  1. path = /media
  2. guest ok = yes
  3. guest only = yes
  4. create mask = 0777
  5. directory mask = 0777
  6. browsable = yes
  7. read only = no
  8. #valid users = bananapi
  9. #force user = root

Copy the Code

You have to log in before you can reply Login | Sign Up

Points Rules