WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: DLNA and SMB server - Suggestions on HOWTO  (Read 14278 times)

Offline manchuwook

  • Newbie
  • *
  • Posts: 13
DLNA and SMB server - Suggestions on HOWTO
« on: February 28, 2011, 07:49:15 AM »
I'm interested in setting up a very basic SMB/CIFS server (to copy files across win machines), a DLNA server (to view video and sound on PS3/XBox), and LVM2 to host the spanned 4TB data repository (2TBx2 drives).  Has anyone set this up with their own TinyCore installation and have a good resource or walkthrough documented?

Offline beerstein

  • Hero Member
  • *****
  • Posts: 530
Re: DLNA and SMB server - Suggestions on HOWTO
« Reply #1 on: February 28, 2011, 08:16:11 AM »
Hi:
I recently was able to get the samba server on TC 3.5 running and working. It took me a while until I found out that
you need to install samba.tcz plus the CIFS utility kit.

smbfs is not supported any more (or at least not the primary choice)

There are many posts here you can search. But the most importatnt is,  as I said the "CIFS thing". I also discovered that TC 3.5 in its basic configuration does not have the smbclient installed. Other distris had that - I remember.
But when you install samba on TC you also will get the smbclient.

have a good day
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline Lee

  • Hero Member
  • *****
  • Posts: 645
    • My Core wiki user page
Re: DLNA and SMB server - Suggestions on HOWTO
« Reply #2 on: February 28, 2011, 01:25:22 PM »
If you have a system that will only be a samba client, the cifs filesystem is included in filesystems-2.6.33.3-tinycore.tcz (and in its 64 bit equivalent).  I haven't actually tried that, as I load the samba extension on all of my TC systems so each has the ability to be share its drives.
32 bit core4.7.7, Xprogs, Xorg-7.6, wbar, jwm  |  - Testing -
PPR, data persistence through filetool.sh          |  32 bit core 8.0 alpha 1
USB Flash drive, one partition, ext2, grub4dos  | Otherwise similar

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11213
Re: DLNA and SMB server - Suggestions on HOWTO
« Reply #3 on: February 28, 2011, 04:14:54 PM »
Hi manchuwook
If this machine will only be serving up files then all you need is Samba. If you want to use it to access files
on other machines you will need filesystems-2.6.33.3-tinycore.tcz and probably cifs-utils.tcz. You will
need to set up a  /usr/local/etc/samba/smb.conf  file. You can use the listing below as a template to set up
simple file sharing without passwords or logging in. # and ; are treated as comments.

Code: [Select]
[global]
guest account = nobody
# Which network card to use.
interfaces = eth0
# Only respond to the interface above.
bind interfaces only = yes
# Use the next two options carefully, they do not work the way you might expect when used together.
# Samba first checks allow, if there's no match then it checks deny, if there's no match it lets you logon.
# Restrict access to local network, block access to DSL modem.
hosts allow = 192.168.1. EXCEPT 192.168.1.1
;hosts deny = ALL
#
log level = 0
# Act as a WINS name server
wins support = yes
# DNS nslookups
dns proxy = no
#
netbios name = BitBucket
# Share makes it easier for no-password logins.
security = share
# String that appears in browse lists.
server string = TC Samba Server
# Just what it says.
workgroup = MYGROUP

[public]
# Directory to be shared.
path = /mnt/hda1
comment = Usable by all
# Set to no to disable this share.
available = yes
# Sets file permission to read,write,execute for everyone.
force create mode = 0777
# Sets directory permission to read,write,execute for everyone.
force directory mode = 0777
# If yes then no password required.
guest ok = yes
# Set to no to allow users to write to files and directorys.
read only = no
# This may speed up some SMB read calls like ReadAndX and ReadRaw.
use sendfile = yes

[smalldrive]
# Directory to be shared.
path = /mnt/hdb1
comment = Temporary workspace
~snip~
# This may speed up some SMB read calls like ReadAndX and ReadRaw.
use sendfile = yes

You will need to set up a user called nobody with no password on the server. To start Samba from the
command line type  sudo /usr/local/etc/init.d/samba start. To have it start on boot up add that line to
/opt/bootlocal.sh without the sudo. To connect to the share from another Linux machine type
mount -t cifs -o guest //192.168.1.47/public /mnt/bitbucket  based on the above file. If you have DNS
working you can replace the IP address with the servers name. I'm sure I've missed something
so if you get stuck, ask questions.
« Last Edit: March 01, 2019, 05:22:39 AM by Rich »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14535
Re: DLNA and SMB server - Suggestions on HOWTO
« Reply #4 on: February 28, 2011, 07:27:17 PM »
a DLNA server (to view video and sound on PS3/XBox)

You can use the rygel extension for this - see the info file for details

Offline manchuwook

  • Newbie
  • *
  • Posts: 13
Re: DLNA and SMB server - Suggestions on HOWTO
« Reply #5 on: March 05, 2011, 09:24:00 AM »
Thank you Beerstein, Lee, Rich, and Juanito! You have all been very helpful.  I seem to be having problems with persistence, but that is another topic.

Offline manchuwook

  • Newbie
  • *
  • Posts: 13
Re: DLNA and SMB server - Suggestions on HOWTO
« Reply #6 on: March 07, 2011, 06:54:57 AM »
After spending about a day working on samba and rygel, I decided to give rygel a pass and install PS3 media server instead.  It works great until I get to the mp3 section, at which point I need to get libmediainfo added in.  Does anyone here know of a good way to get that up and running?  Would it have to be something I need to compile into tce?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11213
Re: DLNA and SMB server - Suggestions on HOWTO
« Reply #7 on: March 07, 2011, 07:17:32 AM »
Hi manchuwook
Sorry, can't help with the media stuff. How did you make out with samba?

Offline manchuwook

  • Newbie
  • *
  • Posts: 13
Re: DLNA and SMB server - Suggestions on HOWTO
« Reply #8 on: March 07, 2011, 07:43:36 AM »
Worked like a charm!  I ended up adding a script to activate and mount my LVM stuff on boot, then another bit to turn on the samba daemon.

I need to tighten up the security a bit, as nao it is set up to = share - but on the plus side, I can map the drive and copy to and fro with my win7 boxes.  I'd ideally like to have at least one service-level account to do all of the accesses, but for some reason it is not doing a backup of my users.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11213
Re: DLNA and SMB server - Suggestions on HOWTO
« Reply #9 on: March 07, 2011, 08:08:00 AM »
Hi manchuwook
Try adding these to your /opt/filetool.lst:

etc/passwd
etc/group
etc/shadow
etc/gshadow
etc/dropbear
usr/local/etc/samba

Dropbear is there because that's what I use to SSH into the box if I want to make changes. Also note
that under  hosts allow  I only allow local machines access and block the DSL connection. The reason's
I use share is because I have control of who accesses the machine and it's easier to set up. Besides,
if one of the clients gets compromised, once you connect to the server any malware on the client
has access anyway.