Setting Up Smb Shares From Linux Box
Posted 09 July 2004 - 04:37 AM
Ok, Im going to start off with this before i get started
SMB= Protocol (Server message block)
Samba= Client that uses SMB protocol to connect and share with window systems
I know of a few people who were having troubles setting up SMB shares from a linux system. So after I figured it out, I thought I would make a tutorial on setting one up. Ive looked all over this forum, but couldnt really find anything on setting one up from a Linux system. To let you know before hand I am running Redhat9 with no GUI. I also have webmin installed to make things easier. To use webmin you must have a webserver up and running. I would highly recommend using webmin. Get it by typing this command in the konsol...
then install with...
rpm -U webmin-1.150-1.noarch.rpm
you can now go to http:///www."YOURDOMAINorIP".com:10000
First things first see if you have samba already set up and enabled on your linux box. Type in the folling command in the linux konsole
-If you dont have samba installed then it will say bash file not found.
-If you do have samba installed then you will see it starting with a green [OK] you should then try the following....
Type in your servers IP adress in the browser bar to see if any shares come up. For example mine is...
If a shared folder shows up it may just show a home folder or it may ask for a user name and password.
If nothing shows up go to step 1
If it ask for a user name and password go to step 2
Step 1 INSTALLING SAMBA
To install samba do ONE of the folling steps...
a. Install samba from your sytem install disc (which is hard with no GUI)
b. Install all the RPM's in this directory
c. Install samba by using the following commands
rpm -U samba-2.2.7a-7.9.0.i386.rpm
rpm -U samba-client-2.2.7a-7.9.0.i386.rpm
rpm -U samba-common-2.2.7a-7.9.0.i386.rpm
After installing samba you must configure it. So on to step 2...
Step 2 CONFIGURING SAMBA
Your samba config file is located at /etc/samba/smb.conf
You are more than welcome to take my config and use it as an example or just replace yours with mine. Always make sure you make a backup of the original. Here is my config file. You can copy paste it and save it as smb.conf
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not made any basic syntactic errors.
#======================= Global Settings =====================================
log file = /var/log/samba/log.%m
smb passwd file = /etc/samba/smbpasswd
load printers = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
map to guest = bad user
encrypt passwords = yes
printer admin = @adm
dns proxy = no
server string = Samba Server %v
printing = cups
workgroup = MSHOME
os level = 20
printcap name = cups
security = user
max log size = 50
comment = Home Directories
browseable = no
writable = yes
# You can enable VFS recycle bin on a per share basis:
# Uncomment the next 2 lines (make sure you create a
# .recycle folder in the base of the share and ensure
# all users will have write access to it. See
# examples/VFS/recycle/REAME in samba-doc for details
; vfs object = /usr/lib/samba/vfs/recycle.so
; vfs options= /etc/samba/recycle.conf
# You may want to prevent abuse of your server disk space, and spread of virii
; veto files = /*.eml/*.nws/*.dll/*.mp3/*.MP3/*.mpg/*.MPG/*.vbs/*.VBS/
# Un-comment the following and create the netlogon directory for Domain Logons
; comment = Network Logon Service
; path = /var/lib/samba/netlogon
; guest ok = yes
; writable = no
#Uncomment the following 2 lines if you would like your login scripts to
#be created dynamically by ntlogon (check that you have it in the correct
#location (the default of the ntlogon rpm available in contribs)
;root preexec = /usr/bin/ntlogon -u %U -g %G -o %a -d /var/lib/samba/netlogon/
;root postexec = rm -f /var/lib/samba/netlogon/%U.bat
# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
; path = /var/lib/samba/profiles
; browseable = no
; guest ok = yes
; writable = yes
# This script can be enabled to create profile directories on the fly
# You may want to turn off guest acces if you enable this, as it
# hasn't been thoroughly tested.
; root preexec = PROFILE=/var/lib/samba/profiles/%u; if [ ! -e $PROFILE ]; \
; then mkdir -pm700 $PROFILE; chown %u.%g $PROFILE;fi
# NOTE: If you have a CUPS print system there is no need to
# specifically define each individual printer.
# You must configure the samba printers with the appropriate Windows
# drivers on your Windows clients. On the Samba server no filtering is
# done. If you wish that the server provides the driver and the clients
# send PostScript ("Generic PostScript Printer" under Windows), you have
# to swap the 'print command' line below with the commented one.
[your share name]
writable = yes
printable = no
public = yes
create mode = 777
path = /var/your_share_folder/at_where_ever
directory mode = 777
You only need to worry about the share at the very bottom. You can name the share anywhere you want. The only other thing you need to change is the path of the share on your linux box. Mine for example is located at \var\www\html\downloads. So thats what I put for my path. After you have everything set up start up samba with the folling command
Go to \\YOUR_SERVERS_IP and see what happens. Your shares should show up. If not PM me or AIM me and ill get you through it.
Step 3 CONFIGURING XBMC
After you have your shares set up its time to configure XBMC to read them. As a default samba uses MDKGROUP as its domain. so inside the paths tags enter this into your smb share located in the XBMC xml..
you can also browse all shares from WORKGROUPS (SMB)
Load up XBMC and test it out and see what happens. This took me many many long nights to figure out so dont get frustrated. Sorry if the tutorial doesnt help or just makes matters worste. I just tried helping the best i knew how. I would be MORE than happy to help anyone having troubles, or to even set it up for you. PM, AIM, or email me with any questions.
Posted 09 July 2004 - 04:42 AM
Edited by SigTom, 09 July 2004 - 04:43 AM.
Posted 09 July 2004 - 04:46 AM
Posted 09 July 2004 - 04:47 AM
Posted 09 July 2004 - 02:35 PM
Posted 20 July 2004 - 10:41 AM
I can read from them, and play media off them just fine.
Can XBMC (latest cvs release) write to samba shares?
Sounds simple, but I can't find any of the samba shares as destination directories in the XBMC filemanager!
I should take my windows laptop home and test, but then if someone can confirm this should work, i'll keep hacking at it a bit more.
Posted 21 July 2004 - 12:06 AM
I tried connecting to a share using my regular username and password.
Still couldn't get any of the file shares to come up as destination directories
Posted 07 August 2004 - 07:43 PM
I use webmin also and the key to getting the shares to show up is to check the box guest only for the share. All other options results in the files not beeing displayed.
I solved this by making a new share of the same directory and selected the guest only on this and it all worked fine.
Posted 13 August 2004 - 04:57 AM
Posted 18 September 2004 - 04:27 AM
Posted 07 October 2004 - 03:20 AM
Posted 07 October 2004 - 05:52 AM
Posted 29 July 2005 - 06:10 AM
I have 2 smb shares that I would like to access, but I would like the contents of the shares to show up when I select SMB Share in XBMC. I can get both shares to come up if I only define one of them, but I can't get them to show up at the same time.
Basically, I have 2 movie shares and I don't want to have to create 2 shares in Xbmc. I would like to be able to select "SMB Shares" and have both listed so I one big list of movies, instead of 2 smaller lists.
Is this even possible? I have tried to seperate the shares with a comma (like how you can if you want to define more than one location for Games, etc.), but haven't had any luck.
If someone has any clue how to do this I would greatly appreciate any help.
Thanks in advance.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users