I wasnt sure where to put this, but i think this is the best place for it.
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...
wget
http://prdownloads.s...50-1.noarch.rpmthen 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
/etc/init.d/smb start
-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...
\\192.168.1.103
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 SAMBATo 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
wget
http://www.emblym.co...-7.9.0.i386.rpm rpm -U samba-2.2.7a-7.9.0.i386.rpm
wget
http://www.emblym.co...-7.9.0.i386.rpm rpm -U samba-client-2.2.7a-7.9.0.i386.rpm
wget
http://www.emblym.co...-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 SAMBAYour 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
| QUOTE |
# 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 ===================================== [global] 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
[homes] 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 ; [netlogon] ; 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 ;[Profiles] ; 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
/etc/init.d/smb start
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..
smb://MDKGROUP;guest@SERVER_IP/"share name"
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.