RaspbmcCrystalbuntu

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Share samba folder to Windows 7
09-23-2012, 12:59 PM
Post: #1
Share samba folder to Windows 7
hi all,

I am having trouble getting a Windows 7 to allow me into my shared samba folder on RASPBMC.

I have done this successfully on an XBMCBUNTU machine although I have to say I don't understand 100% what I have done - I followed other examples.

Some questions:

1. Is it possible for me to change the username from "pi" to something else?

on my XBMCBUNTU machine I set the username and password to be the same on each OS.

2. What would be significantly different between the XBMCBUNTU machine and RASPBMC that would affect setting up samba shares?

3. Any thoughts on what causes Windows 7 to pop up the "Windows Security" dialog box and to request "Enter Network Password"

I have found when I get to this step and enter my valid password that it is not accepted.

This is how I set up my share

Code:
[samba]
comment = samba directory
path = /etc/samba/
valid users = mark
guest ok = yes
writeable = yes
write list = mark
read only = no
force user = mark

thanks!

Mark
Find all posts by this user
Quote this message in a reply
09-23-2012, 01:23 PM
Post: #2
RE: Share samba folder to Windows 7
Have you set up a Samba password for the "mark" user? If not,

Code:
sudo smbpasswd -a mark

will let you set that up.
Find all posts by this user
Quote this message in a reply
09-23-2012, 01:38 PM
Post: #3
RE: Share samba folder to Windows 7
(09-23-2012 01:23 PM)benryves Wrote:  Have you set up a Samba password for the "mark" user? If not,

Code:
sudo smbpasswd -a mark

will let you set that up.

Thanks,

I thought I had - as I was following instructions here.

http://elinux.org/R-Pi_NAS

I just the command you suggested and it reported back "Added user mark."

for good measure I also did this for "pi" and for pi it did not make the note about adding a user.

I restarted samba and things are a bit different now!

Windows accepted my credentials - I did it so fast I don't remember if I logged in as pi or mark.

I can see the samba folder now and open the files, but it will not let me modify them.

I think this has something to do with ownership of the samba folder and files in it.

Is there a good guide somewhere for adding and modifying file and folder rights from the command line?

Thanks for the quick response benryves!
Find all posts by this user
Quote this message in a reply
09-24-2012, 12:43 AM
Post: #4
SOLVED: Share samba folder to Windows 7
I got over the hurdle with this command

root@raspbmc:/etc# chown -R mark samba

The long answer is that one needs to become familiar with linux chmod and chown, groups, users, etc.

I would prefer to change the username from pi to my name but maybe that is not possible.

I had my samba shares working but then ran into problems where the USB drives do not enumerate the same with each boot... story for another thread.
Find all posts by this user
Quote this message in a reply
09-24-2012, 12:59 AM
Post: #5
RE: Share samba folder to Windows 7
I got around permission issues by putting 'force user = root' under all writable shares. That makes samba perform all file operations from that share as root on the pi regardless of what user has logged into the share.
my smb.conf looks like this
Code:
# smb.conf

[global]
  server string = Media Center
  workgroup = HOME
  netbios name = %h
  security = share
  guest account = pi
  socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
  smb ports = 445
  min receivefile size = 16384
  deadtime = 30i
  os level = 20
  mangled names = no
  syslog only = yes
  syslog = 2
  name resolve order = lmhosts wins bcast host
  preferred master = yes
  domain master = yes
  local master = yes
  printcap name = /dev/null
  load printers = no
  browseable = yes
  writeable = yes
  printable = no
  encrypt passwords = true
  enable core files = no
  passdb backend = smbpasswd
  smb encrypt = disabled
  use sendfile = yes
  interfaces = 127.0.0.0/8 eth0

# Using the following configurations as a template allows you to add
# writable shares of disks and paths under /storage

#This is a password protected writable share
[!Media Root!]
  path = /media/usb0/
  available = yes
  browsable = yes
  public = no
  writable = yes
  valid users = quonith root
  force user = root

[!SD Root!]
  path = /
  available = yes
  browsable = yes
  public = no
  writable = yes
  valid users = quonith root
  force user = root

#This is a public writable share
[~Shared~]
  path = /media/usb0/Shared
  available = yes
  browsable = yes
  public = yes
  writable = yes

#This is a public read-only share
[TV and Film]
  path = /media/usb0/TV and Film
  available = yes
  browsable = yes
  public = yes
  writable = no

[Music]
  path = /media/usb0/Music
  available = yes
  browsable = yes
  public = yes
  writable = no

[Software]
  path = /media/usb0/Software
  available = yes
  browsable = yes
  public = yes
  writable = no

[Game Stuff]
  path = /media/usb0/Game Stuff
  available = yes
  browsable = yes
  public = yes
  writable = no

[Other Stuff]
  path = /media/usb0/Other
  available = yes
  browsable = yes
  public = yes
  writable = no

[ISOs]
  path = /media/usb0/ISOs
  available = yes
  browsable = yes
  public = yes
  writable = no
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Sponsored Advertisement