View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 50 posts ] 
Go to page 1, 2, 3, 4  Next

Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Tue Jan 06, 2004 1:58 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
EDIT 20-Jan-2008 - I originally wrote this howto guide back on on Tue Jan 06, 2004. Back then, you needed to do it manually. Recent builds (like R5.5 for example) have Samba pre-configured for you. All you need to do is start it on the LINUX end. Read on for this and read the entire post if you are interest. Again, you don't need to do much beyond simply starting samba on R5.5 :)

What is Samba and why do you want it? In a nutshell Samba allows your LINUX [mythtv] machine to share files with Windows machines. It's useful if you have a bunch a music and/or video files on your Windows machine that you want to drag-and-drop through the Windows GUI to the LINUX machine.

Additionally, you can use it to grab backups from LINUX to your Windows machine, move other others, etc.

If you have any experience using multiple windows machines through your network shares, Samba presents the LINUX box to your Windows machine as if it too was a Windows machine. In other words, you can connect to LINUX through Windows using the familiar drag-and-drop interface Windows uses natively. Makes sense?

To enable it, simply start it on your LINUX box with this command:
Code:
# /etc/init.d/samba start


Now to connect to it from your Windows box, simply map a network drive to \\mythtvname\sharename or simply type that into your run (windows key+r) box to bring up a window.

Example:

\\mythtv\myth

That will bring up the /myth on your LINUX side

Now, to have SAMBA start up automatically when your mythbox is booted, do this:
Code:
# update-rc.d samba defaults


If you want to have the ability to drag-and-drop files into your mythtv home directory on the LINUX side, do this:
Code:
 # nano /etc/samba/smb.conf


Now change the "read only" line from yes to no under the [homes] section and exit (ctrl+x) saving changes.

Code:
; By default, the home directories are exported read only. Change next
;   parameter to "no" if you want to be able to write to them.
   read only = no


If you're experiencing speed problems, see this thread to fix them.

That's pretty much it. I'll keep the original thread below for posterity's sake.

-----

Original thread from Tue Jan 06, 2004 2:58 pm (now OUTDATED):

Disclaimer: this is not a general howto, it is merely what I did to get Samba working for me. I'm sure others in the group can write a much more elegant document. I'm also sure there is a better way to enable samba. Again, this is what I did and I hope others find it helpful :)

Starting Samba to allow file transfers to/from your Windows XP/2000 box to your mythtv box.

Outline

Part 1. Get webmin up (allows easy way to configure Samba via http)
Part 2. Start Samba
Part 3. Start the Share

For the setup as I describe it to work, you must have the an account in LINUX created that has the same username/password as your Windows account. So if your Windows username is "brick" and your windows password is "centexsucks" then you must have an account on your myth box with a login of "brick" and a password of "centexsucks" -- I’ll use that username/password in the example.

PART 1

su to root and do:

$ smbpasswd -a brick
$ /usr/share/webmin/changepass.pl /etc/webmin root password

(where “password” is the password you wanna use to log into webmin)

$ vi(or your favorite editor) /etc/webmin/miniserv.conf and comment or modify it so that it has the following line:

allow 127.0.0.1

You also may want to add another allow statement for an IP or several IPs of other machines in your LAN if you wish to access from there. As an example, here is what I added so my windows box can use webmin:

allow 192.168.1.2

$ /etc/init.d/webmin start

PART 2

$ cp /etc/samba/smb.conf /etc/samba/smb.conf_virgin (never hurts to back up files)
$ vi /etc/samba/smb.conf

You need to comment out the line in the smb.conf file that includes the directives.

# include = /etc/samba/dhcp.conf

PART 3

login to webmin from your browser (https://ipaddy-of-box:10000)
Go to; Servers>Samba Windows File Sharing
Create new share
Give it a name and hit “Create”

Edit it and click “File Permissions’
For 'New Unix file mode' and 'New Unix directory mode' read/write give it 0750. Then click 'save'

Click 'security and access control' and check the box called 'writeable?'

You might have to do a:
# /etc/init.d/samba restart

On your windows machine, simply map a network drive to \\mythtvname\sharename or simply type that into your run box to bring up a window.

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Last edited by graysky on Tue Jan 20, 2009 3:47 pm, edited 13 times in total.


Top
 Profile  
 
PostPosted: Tue Jan 06, 2004 4:36 pm 
Offline
Joined: Mon Oct 06, 2003 6:05 pm
Posts: 39
Location: Cincinnati, Ohio
Yup, I never knew how to start Webmin :) that helped me.

Everything worked except when I went to access Webmin I had to type:
https://ip-address:10000.

Thanks.


Top
 Profile  
 
PostPosted: Tue Jan 06, 2004 8:13 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
jdubya wrote:
Yup, I never knew how to start Webmin :) that helped me.

Everything worked except when I went to access Webmin I had to type:
https://ip-address:10000.

Thanks.


Right you are Jdubya. Fixed it. Glad to here my efforts are helping others :)

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 07, 2004 3:43 am 
Offline
Joined: Sun Dec 28, 2003 10:31 pm
Posts: 6
Location: Roseville, MI
Nice work. I also have WinXP and plan to share files between both machines. I will certainly be using this guide soon.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 07, 2004 6:39 am 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
Thanks guys, always glad to help. By the way, if you're into divx or xvid movies, the mythvideo really kicks ass... and Samba will allow you to transfer them to the mythbox. I'm sure there's a configuration that allows the myth box to access your Windows shares. Maybe someone will write a howto for this.

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 07, 2004 9:18 am 
Offline
Joined: Fri Dec 26, 2003 2:25 pm
Posts: 244
On a some-what-related note, if you want to view the nuv files that you've captured on your windows machine, you will need to install dsmyth. You can find it here:

http://sourceforge.net/projects/dsmyth/

Once installed, you can then view nuv files in windows media player.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 08, 2004 1:58 pm 
Offline
Joined: Thu Jan 08, 2004 1:38 pm
Posts: 1
Thanks for your information, but i'm having some trouble. I'm new to linux so please keep that in mind. I'm able to install KnoppMyth since last week, i tried a lot of stuff read here and on other forums. I'm allready capable of updating XMLTV and installing MC (sorry but i having difficulties to rember where all the files are stored, this util helps me a bit) but I can't figure out how to get this working like it should.

I followed your instructions, but since i don't use a password on my XP machine i think there the start for my first problem. I created a samba password for the main user on my XP box (that's me, having administor rights and being the only user). Hope that it is possible? Second I did setup webmin following your instructions and i even can get to it. But i can't find the "directives" and receive the following error in webmin console when trying to connect to Samba "Webmin cannot handle Samba config files that use the config or include directives". What did go wrong?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 18, 2004 7:19 am 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
Re-read my original post. Pay attention to "Part 2."

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 23, 2004 7:44 pm 
Offline
Joined: Tue Jan 20, 2004 6:09 pm
Posts: 10
graysky i'm having the exact same problem as KlereBak

Can you help us understand what you meen by "pay attention to Part 2"? I know i'm doing something wrong but i also dont see the word "directives" in that file.

Thanks
Bill


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 23, 2004 8:12 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
Bill,

Damn, I just edited my smb.conf and cannot find that reference either. I think I might have delected that line all together. Here is the contents of my /etc/samba/smb.conf:

Can you post yours so we can compare them? Also, after backing up your original one, delete the old one, and replace it with mine. I would recommend changing the line "workgroup = DWORK" to reflect your windows setup (ie what is the name of your workgroup? put it in there).

To make a new file, use this command:
(as root)
# touch /etc/samba/smb.conf
then paste my config (modified with your workgroup) in there and let us know how it worked.

Sorry I can't be of more help at the moment :(

Quote:
[global]
load printers = yes
name resolve order = lmhosts host wins bcast
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
obey pam restrictions = yes
preserve case = yes
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=4096 SO_RCVBUF=4096
encrypt passwords = true
passwd program = /usr/bin/passwd %u
passdb backend = smbpasswd guest
dns proxy = no
netbios name = mythtv
writeable = yes
printing = bsd
server string = %h server (Samba %v)
invalid users = root
path = /myth
unix password sync = false
workgroup = DWORK
os level = 20
syslog only = no
printcap name = /etc/printcap
syslog = 0;
security = user
short preserve case = yes
panic action = /usr/share/samba/panic-action %d
max log size = 1000

[homes]
comment = Home Directories
browseable = no

; By default, the home directories are exported read only. Change next
; parameter to "no" if you want to be able to write to them.
read only = yes

; File creation mask is set to 0700 for security reasons. If you want to
; create files with group=rw permissions, set next parameter to 0775.
create mask = 0700

; Directory creation mask is set to 0700 for security reasons. If you want to
; create dirs. with group=rw permissions, set next parameter to 0775.
directory mask = 0700

[printers]
comment = All Printers
browseable = no
path = /tmp
printable = yes
public = no
writable = no
create mode = 0700

[myth]

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject: Here it is
PostPosted: Fri Jan 23, 2004 8:40 pm 
Offline
Joined: Tue Jan 20, 2004 6:09 pm
Posts: 10
Thanks for the fast response
Here is mine




; /etc/samba/smb.conf
;
; Sample configuration file for the Samba suite for Debian GNU/Linux
;
; Please see the manual page for smb.conf for detailed description of
; every parameter.
;

[global]

# Do something sensible when Samba crashes: mail the admin a backtrace
panic action = /usr/share/samba/panic-action %d
printing = bsd
printcap name = /etc/printcap
load printers = yes
guest account = nobody
invalid users = root

; "security = user" is always a good idea. This will require a Unix account
; in this server for every user accessing the server.
security = user

; Change this for the workgroup your Samba server will part of
workgroup = WORKGROUP

server string = %h server (Samba %v)

; If you want Samba to log though syslog only then set the following
; parameter to 'yes'. Please note that logging through syslog in
; Samba is still experimental.
syslog only = no

; We want Samba to log a minimum amount of information to syslog. Everything
; should go to /var/log/{smb,nmb} instead. If you want to log through
; syslog you should set the following parameter to something higher.
syslog = 0;

; This socket options really speed up Samba under Linux, according to my
; own tests.
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=4096 SO_RCVBUF=4096

; Passwords are encrypted by default. This way the latest Windows 95 and NT
; clients can connect to the Samba server with no problems.
encrypt passwords = true
passdb backend = smbpasswd guest

; It's always a good idea to use a WINS server. If you want this server
; to be the WINS server for your network change the following parameter
; to "yes". Otherwise leave it as "no" and specify your WINS server
; below (note: only one Samba server can be the WINS server).
; Read BROWSING.txt for more details.
wins support = no

; If this server is not the WINS server then specify who is it and uncomment
; next line.
; wins server = 172.16.0.10

# If we receive WINS server info from DHCP, override the options above.
include = /etc/samba/dhcp.conf

; Please read BROWSING.txt and set the next four parameters according
; to your network setup. There is no valid default so they are commented
; out.
; os level = 0
; domain master = no
; local master = no
; preferred master = no

; What naming service and in what order should we use to resolve host names
; to IP addresses
name resolve order = lmhosts host wins bcast

; This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no

; Name mangling options

preserve case = yes
short preserve case = yes

; This boolean parameter controlls whether Samba attempts to sync. the Unix
; password with the SMB password when the encrypted SMB password in the
; /etc/samba/smbpasswd file is changed.
unix password sync = false

; For Unix password sync. to work on a Debian GNU/Linux system, the following
; parameters must be set (thanks to Augustin Luton
; <aluton@hybrigenics.fr> for sending the correct chat script for
; the passwd program in Debian Potato).
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .

; The following parameter is useful only if you have the linpopup package
; installed. The samba maintainer and the linpopup maintainer are
; working to ease installation and configuration of linpopup and samba.
; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &

; The default maximum log file size is 5 MBytes. That's too big so this
; next parameter sets it to 1 MByte. Currently, Samba rotates log
; files (/var/log/{smb,nmb} in Debian) when these files reach 1000 KBytes.
; A better solution would be to have Samba rotate the log file upon
; reception of a signal, but for now on, we have to live with this.
max log size = 1000

obey pam restrictions = yes

; Some defaults for winbind (make sure you're not using the ranges
; for something else.)
; winbind uid = 10000-20000
; winbind gid = 10000-20000
; template shell = /bin/bash

[homes]
comment = Home Directories
browseable = no

; By default, the home directories are exported read only. Change next
; parameter to "no" if you want to be able to write to them.
read only = yes

; File creation mask is set to 0700 for security reasons. If you want to
; create files with group=rw permissions, set next parameter to 0775.
create mask = 0700

; Directory creation mask is set to 0700 for security reasons. If you want to
; create dirs. with group=rw permissions, set next parameter to 0775.
directory mask = 0700

[printers]
comment = All Printers
browseable = no
path = /tmp
printable = yes
public = no
writable = no
create mode = 0700

; A sample share for sharing your CD-ROM with others.
;[cdrom]
; comment = Samba server's CD-ROM
; writable = no
; locking = no
; path = /cdrom
; public = yes
;
; The next two parameters show how to auto-mount a CD-ROM when the
; cdrom share is accesed. For this to work /etc/fstab must contain
; an entry like this:
;
; /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0
;
; The CD-ROM gets unmounted automatically after the connection to the
;
; If you don't want to use auto-mounting/unmounting make sure the CD
; is mounted on /cdrom
;
; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 23, 2004 9:21 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
Did replacing yours with mine help in webmin?

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject: :(
PostPosted: Fri Jan 23, 2004 9:25 pm 
Offline
Joined: Tue Jan 20, 2004 6:09 pm
Posts: 10
to be honest with you i could not figure out how to do that.
i'm using putty to ssh into myth but i cant figure out the right steps to delete what is in that file anc copy and paste from this forum :(


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 23, 2004 9:30 pm 
Offline
Joined: Fri Sep 19, 2003 7:05 pm
Posts: 5088
Location: Fontana, Ca
You could copy the contains of the post into notepad and edit there... Then use WinSCP to copy to your boxen. You can Google for WinSCP.

_________________
cesman

When the source is open, the possibilities are endless!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 23, 2004 9:31 pm 
Offline
Joined: Tue Jan 20, 2004 6:09 pm
Posts: 10
i will try that and let you know...thanks for your help


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 50 posts ] 
Go to page 1, 2, 3, 4  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu