Linux - SMB problems XBMCbuntu

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
PogMoThoin Offline
Senior Member
Posts: 230
Joined: Oct 2011
Reputation: 1
Post: #1
A fresh install of XBMCbuntu final worked for a few days, now it doesn't see samba shares on my network anymore. Ubuntu laptop sees them and works fine. Anyone any ideas?

[Image: all-banner.jpg]
find quote
wiz561 Offline
Senior Member
Posts: 184
Joined: Feb 2009
Reputation: 0
Post: #2
Try to go into the context menu and hit "update" or "scan for updates". See if that makes a difference. For reasons unknown, sometimes my samba connection is dropped and this fixes it.
find quote
PogMoThoin Offline
Senior Member
Posts: 230
Joined: Oct 2011
Reputation: 1
Post: #3
(2012-03-31 22:52)wiz561 Wrote:  Try to go into the context menu and hit "update" or "scan for updates". See if that makes a difference. For reasons unknown, sometimes my samba connection is dropped and this fixes it.

Please explain a little better, context menu where? XBMC or XBMCbuntu? In XBMC I only see update library which doesn't work as none of my smb shares are visible

[Image: all-banner.jpg]
find quote
PogMoThoin Offline
Senior Member
Posts: 230
Joined: Oct 2011
Reputation: 1
Post: #4
Ended up reinstalling XBMCbuntu to get this working as I wanted to watch some media. Hopefully it won't go tits up again. I'll be back if it does

[Image: all-banner.jpg]
(This post was last modified: 2012-04-01 16:25 by PogMoThoin.)
find quote
Plaguester Offline
Senior Member
Posts: 262
Joined: May 2010
Reputation: 7
Post: #5
I found that the general performance of my shares was much better (40MB/s to 25MB/s) if I added them as permanently mounted shares.

Open a terminal
Code:
# make folders where the shares will be mounted
$ sudo mkdir -p /server/movies

# replace vi with your favorite editor (nano or gedit are easier for beginners)
$ sudo vi /etc/fstab

Add a new line (replace "<user>" with the user that should have read/write access; "xbmc" or "dave" will work):
Code:
...
# Server Shares (this line assumes your share requires user/password credentials
//192.168.1.100/movies /server/movies  cifs    rw,cred=/etc/samba/user,uid=<user>,gid=<user>,file_mode=0644,dir_mode=0755 0  0

# this line skips the username and password
//192.168.1.100/movies /server/movies  cifs    rw,guest,uid=<user>,gid=<user>,file_mode=0644,dir_mode=0755 0  0

If you need the username and password, here's how you set up the credentials file:
Code:
$ sudo vi /etc/samba/user
username=user
password=pa$$word!

# this is important as it makes the file only readable by root
$ sudo chmod 600 /etc/samba/user

Lastly:
Code:
# flip the switch
$ sudo mount -a

# If you get errors about the type "cifs" not existing, do this and then reboot
$ sudo apt-get install smbfs

Edited for completeness.

HTPC 1 - Zotac ZBOX ID80U | 4GB RAM | 64GB SSD | Openelec | Confluence
HTPC 2 - Zotac ZBOX ID41U | 4GB RAM | 60GB SSD | Openelec | Confluence
Server - unRAID Server | 3 x 2TB WD Green HDD, 1TB WD Black HDD (Cache) | Sabnzbd | CouchPotato | Sickbeard
(This post was last modified: 2012-04-09 03:49 by Plaguester.)
find quote
wiz561 Offline
Senior Member
Posts: 184
Joined: Feb 2009
Reputation: 0
Post: #6
Ah, yes, you can do what Plaguester said. I'd actually recommend going that route. I had issues with the samba before and it loosing the connection too. I forgot, but I think in the end, I just mapped the drive in fstab.
find quote
PogMoThoin Offline
Senior Member
Posts: 230
Joined: Oct 2011
Reputation: 1
Post: #7
Will do this tomorrow, thanks folks

[Image: all-banner.jpg]
find quote
tooner Offline
Junior Member
Posts: 3
Joined: May 2012
Reputation: 0
Post: #8
Hi
I'm having problems with SMB also. When I try to access network shares it just doesn't work. I've tried mount -cifs and also editing the fstab. When I try to look for shares from within XBMC it doesn't see any of the Windows PCs on my LAN. There are shares on two computers which can both be accessed anonymously from this computer when using Windows7. It's a brand new install of XBMCBuntu with updates installed during install. Any suggestions?

Thanks in advance
tooner
find quote
tooner Offline
Junior Member
Posts: 3
Joined: May 2012
Reputation: 0
Post: #9
I managed to resolve my issue. Here's a couple of links that might come in useful:

Mapping shares with spaces

Cannot allocate memory error
find quote
dandirk Offline
Senior Member
Posts: 226
Joined: Oct 2008
Reputation: 1
Post: #10
I just ran into a similar issue though it had to do with me monkeying with my router, which caused name resolution issues.

Not that is was a factor here, since the OP did say his other linux laptop worked, just didn't mention by ip or name...

Just FYI, I have found xbmc and windows network names to always be a trouble (though vastly improved with recent versions).
find quote