I'm trying to set up an SMB share on my network using Samba.
I followed the directions here as well as I could as I have Raspbian installed on my Pi. When I plugged in my USB drive it automounted to
/media/Media/ so I skipped the first part.
What I did was the following:
apt-get install samba
apt-get install samba-common-bin
Edited samba config
Load smb config files from /etc/samba/smb.conf rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384) Processing section "[usb]" Loaded services file OK. Server role: ROLE_STANDALONE [global] workgroup = WORKGROUP server string = %h server map to guest = Bad User obey pam restrictions = Yes pam password change = Yes passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . unix password sync = Yes syslog = 0 log file = /var/log/samba/log.%m max log size = 1000 dns proxy = No usershare allow guests = Yes panic action = /usr/share/samba/panic-action %d idmap config * : backend = tdb valid users = %S create mask = 0700 directory mask = 0700 [usb] comment = USB Share path = /media/Media read only = No create mask = 0777 directory mask = 0777 guest only = Yes guest ok = Yes
So the setup appears OK, I can see the files in
/media/Media on the Pi, I can see
RASPBERRYPI in my workgroup from my Windows7 box. But when I try to access it I get a logon failure. I also have a 2nd pi with RaspBMC installed and I also cannot access the SMB share from there either.
Is there something else I need to do in Samba to get this working?
I did some more work on this last night. I added a new user to the Raspberry, set a password, added a new user to Samba, set the password and added the following lines.
[global] security=user [usb] allow users biff
(or something similar I forget the exact syntax)
And now I've managed to get an error like... "You do not have authorization to access this share". I'm thinking perhaps I'll work on my Pi directly tonight instead of using putty and perhaps there is something I'll be able to see when using a text editor instead of
Ok I finally resolved this. The problem was that I could not use the pi login to access the pie using smb and also that I could not change the permissions of the automounted /media/Media drive.
I found my solution here https://superuser.com/questions/57092/cant-change-permission-ownership-group-of-external-hard-drive-on-ubuntu
I had to install ntfs
sudo apt-get install ntfs-config
and then I ran the ntfs configuration tool which just gives anyone read/write access.
Not the best solution but it is sufficient in my case for sharing files on the network.