Translate This Page

About Me

profile_picture_120

Name: Joshua Lyon
Birthday: August 8, 1985
Location: Valley Ranch (Irving), TX
E-mail: josh@boshdirect.com

Related Articles

Content View Hits : 1137571
Setup Samba/Windows Shares on XBMC Live
Written by Josh Lyon   
Sunday, 07 February 2010 14:43

It's relatively easy to setup samba shares on XBMC Live, but it does require bashing out some commands on the shell. First, you'll need to install samba using apt-get:

sudo apt-get update
sudo apt-get install samba

Then, you'll want to configure your shares by editing the the file named smb.conf, placed in the /etc/samba/ directory. For example, I added the user folder and media folders to be available shares by running the following command:

sudo nano /etc/samba/smb.conf

Update: It looks like this has changed in the more recent versions of Ubuntu that the XBMC Live distribution is packaged with (10.04). You can restart the samba service using the old method:

sudo service smbd restart
sudo service nmbd restart

Scroll down all the way to the bottom of the file, then paste in the following (use right click in Putty to paste something from your clipboard):

[xbmc]
 path = /home/xbmc
 public = yes
 guest only = yes
 writable = yes
 browseable = yes
 force user = xbmc
 inherit permissions = yes

[media]
 path = /media
 public = yes
 guest only = yes
 writable = yes
 browseable = yes
 force user = xbmc
 inherit permissions = yes

After that, restart the samba server using:

sudo /etc/init.d/samba restart

Note: I updated the samba configuration above to include the 'force user' and 'inherit permissions' features as I was having trouble with newly created files not getting the right permissions and logging into samba.

Also, when accessing the shares from Windows, if you left the default security options you can use the account 'guest' with no password to access the shares. Otherwise, you can play with the settings to force a local linux account to be used in order to access the shares.

Comments (13)

...
0
man this site is full of great stuff. this just might mean i dont have to buy a NAS (as uPNP on XBMC Live is hell)
greg , May 05, 2010
... , Lowly rated comment [Show]
... , Lowly rated comment [Show]
...
0
Thank you, works excellent. Now I can finally browse the folders of Asrock ION3D XMBC from my Macbook.
barry , December 29, 2010
Thanks.
0
Thank you very much for providing this information. You rock! smilies/grin.gif
Mike , January 17, 2011
works, but the problem with this is.......
0
Yes this works however the problem with this is that it shows on Windows client with the free space as only the free space available on the OS drive.

Since I am running XBMClive from a 4 gig memory stick with 2 gig available, when I plug in a 800 gig external disk , it still shows only 2 gig available.

Therefore this is not a solution for a pendrive install of XBMC live, which is what I was hoping for. I would never be able to copy a DVD file to it.

I have the same behaviour with my Airlink 101 ANAS350. It as well only shows available space on primary disk, ands once full does not allow me to copy to connected USB disks.
Markosjal , May 30, 2011 | url
Is this a typo?
0
sudo service smbd restart
sudo service nmbd restart

whats nmbd?
typo guy , August 19, 2011
Mr
0
Ok, stupid question maybe, but being new to Linux, i am most likely doing something wrong....

The problem I have is that I logged into putty using root etc but when I type the "sudo apt-get install samba" command it seems that it does want to install samba, but throws out errors and says that it wasn't successful. The only thing i could think of looking at the script is that my gateway/router is maybe blocking the request..... Or could there be something wrong with my install of the OS??? Below is the Description:

login as: root
This e-mail address is being protected from spambots. You need JavaScript enabled to view it 's password:
Linux XBMCLive 2.6.32-29-generic #58-Ubuntu SMP Fri Feb 11 19:00:09 UTC 2011 i686 GNU/Linux
Ubuntu 10.04.2 LTS - XBMCLive Dharma

Welcome to Ubuntu!
* Documentation: https://help.ubuntu.com/
Last login: Sun Aug 21 17:13:19 2011 from gaming-1.mem-tech.co.za
root@XBMCLive:~# sudo apt-get install samba
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libfile-copy-recursive-perl samba-common samba-common-bin update-inetd
Suggested packages:
openbsd-inetd inet-superserver smbldap-tools ldb-tools ufw
The following NEW packages will be installed:
libfile-copy-recursive-perl samba samba-common samba-common-bin update-inetd
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 11.5MB of archives.
After this operation, 31.6MB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
libfile-copy-recursive-perl samba-common samba-common-bin update-inetd samba
Install these packages without verification [y/N]? y
Err http://archive.ubuntu.com/ubuntu/ lucid/main libfile-copy-recursive-perl 0.38-1
400 Bad Request [IP: 91.189.88.31 80]
Err http://archive.ubuntu.com/ubuntu/ lucid-updates/main update-inetd 4.35ubuntu0.1
400 Bad Request [IP: 91.189.88.31 80]
Err http://archive.ubuntu.com/ubuntu/ lucid-updates/main samba-common 2:3.4.7~dfsg-1ubuntu3.4
400 Bad Request [IP: 91.189.88.31 80]
Err http://archive.ubuntu.com/ubuntu/ lucid-updates/main samba-common-bin 2:3.4.7~dfsg-1ubuntu3.4
400 Bad Request [IP: 91.189.88.31 80]
Err http://archive.ubuntu.com/ubuntu/ lucid-updates/main samba 2:3.4.7~dfsg-1ubuntu3.4
400 Bad Request [IP: 91.189.88.31 80]
Failed to fetch http://archive.ubuntu.com/ubun...-1_all.deb 400 Bad Request [IP: 91.189.88.31 80]
Failed to fetch http://archive.ubuntu.com/ubun....4_all.deb 400 Bad Request [IP: 91.189.88.31 80]
Failed to fetch http://archive.ubuntu.com/ubun...4_i386.deb 400 Bad Request [IP: 91.189.88.31 80]
Failed to fetch http://archive.ubuntu.com/ubun....1_all.deb 400 Bad Request [IP: 91.189.88.31 80]
Failed to fetch http://archive.ubuntu.com/ubun...4_i386.deb 400 Bad Request [IP: 91.189.88.31 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
root@XBMCLive:~#

Any help would be appreciated
Gadget , August 21, 2011
Re: Samba Install Error
62
@Mr Gadget-
I should have put it in the article, but did you run a sudo apt-get update before running the install command? Try running the apt-get update then try to run through the rest of the commands in the article.

Alternatively, you may want to look at the other command they recommended which is to run: sudo apt-get update --fix-missing
Josh Lyon , August 21, 2011
@typo guy [not a typo]
62
@typo guy-
The reference to nmbd is not a typo - it's one of the services that should be restarted after changing the samba configuration. (It's one of the samba daemons)
Josh Lyon , August 21, 2011
...
0
@ Joshua

Thank you very much for the quick reply, I did originally try the "sudo apt-get update" but all I keep getting is the errors saying "Failed to fetch bad request: ip etc" so i think it might be the proxy/router blocking putty from my windows box. Anyway, im order to get that sorted out I will have to get a friend of mine over here tosee where the problem is with that because that's waaaaaay above my pay grade, LoL!!!

Thank you again for the reply and apologies for the stupid questions.
Gadget , August 21, 2011
...
0
Thank you josh, i decided to connect the XBMC directly to the switch, power down the server and the router (Just in case) and then removed the settings from the xbmc box to get the ip automatically, which then worked as far as the "sudo apt-get update" and "samba " was concerned. It then installed all the missing updates/packages and installed samba which is now working, so that is working very well thank you.

The only problem i have now, is that now when i try access the "XBMCLIVE" in windows, it allows me to see the two folders that have now been shared, but it reports "Access Denied" when i select the folders to browse the contents. Is there something that i could have done wrong, or is it just Win7 being anal about the security (I did actually even add the XBMCLIVE to the "Store Credentials For automatic Logon" and tried bot the admin as well as the root option, but still no luck getting access to the two folders shared!!!

Thanking you again for the help and apologize for the "Maybe" stupid questions.
Gadget , August 22, 2011
Samba server
0
Thanks for sharing.....
Below link is easy to understand,
http://www.redhatlinux.info/2011/11/configure-samba-server.html
Pravin , November 27, 2011 | url

Write comment

smaller | bigger
security image
Write the displayed characters

busy