View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 1 post ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Tue Jan 20, 2009 3:35 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
Part 0. Background Info
Part 1. Setup the share under Windows
Part 2. Setup KM to use the Windows share


Part 0. Background Information
As a companion post to my HOWTO: Connect Windows to KM to share files via Samba, which is very much targeted at sharing files from the LINUX side, I wanted to give folks who might have some Windows shares a suggested way to have KM easily read or read/write to them.

Why would you want to do this? Again, some folks may have some serious HDD space on a Windows box (or NAS for that matter), and might be interested in having KM read or read/write to these shares.

Suggested applications of this: sharing photos from a windows share with mythgallery. Sharing music with mythtv's music module or video files with mythtv's video module all from a windows share. (I think you get the idea).

This HOWTO is kinda aimed at new users btw.

Part 1. Setup the Share(s) Under Windows

Odds are you know how to use the WIndows GUI to setup a share. I have briefly covered it for you under Windows XP since I don't have Vista nor would I curse any PC by installing it! Also know that most NAS devices have an option to use Samba or CIFS sharing which is the same thing as what I'm describing below.

Right-click the directory of interest on your WIndows box and select 'properties' from the menu, then go to the 'sharing' tab. I think you might have to disable an option called 'simple file sharing' to see what I show in the screenshots below (tools menu>folder options>view> scroll down to the bottom and UNCHECK the simple file sharing),

Image

Go ahead and give your share a name, I used 'share' in this example but you can call it whatever you want. Don't use spaces though. Now hit the 'Permissions' button and select the permissions the share will have (i.e. read only, full control, etc.).

Image

If you add a user to your Windows machine specifically for mythtv, you can limit the share down ONLY to that specific user here if you want. This can be useful depending on your network's physical location (i.e. single family house vs. apartment complex) and how secure you feel sharing directories - this is particularly important to consider if you're using wireless networking that isn't securely setup!

You might want to make a new user account and make it 'limited' (in other words NOT an administrator) so that it can only read the files and not administrator the system. Give the user a good password if you do this. I helped a friend running KM do this since he has a huge HDD on his Windows box, but a fairly small one on his KM box. We used a Windows user name of 'mythtv' and used this guide to hide the user from the Windows XP Welcome Screen.

Anyway, go ahead and say 'OK' and you will have successfully created the share as well as assigned permissions.

Part 2. Setup KM to Use the Windows Share

Now that you've got the Windows box sharing the dir, select a location on your KM box mount the share.

Suggestions:
If you're sharing video content that you want to watch via mplayer in mythvideo, you might select /myth/video/share or if you want to share photos to view in mythgallery you might use /myth/gallery/share etc.

Once you have decided on a location, simply make a directory where you'd like the share to mount. I'll use /myth/video/share

Code:
$ mkdir /myth/video/share


Now we'll make a 'credentials' file that will store the windows username and password that only root can see on your KM box. This will make the share more secure.

Do so like this:

Code:
$ su -
(enter your root password)
# nano .smbpasswd


Structure your file like this:
Code:
username=mythtv
password=mythuserpassword


Obviously, you'll replace the username and password with the windows account of your liking.

Now save the file and do the following to make it only viewable to root:

Code:
# chmod 600 .smbpasswd


Now make an entry in the /etc/fstab point the window's share to the directory that you've made on KM:

ALWAYS back-up any file you're working with prior to saving your changes!
Code:
# cp /etc/fstab /etc/fstab_virgin


Now add a line to the /etc/fstab similar to mine:
Code:
//192.168.1.4/share /myth/video/share/       cifs    credentials=/root/.smbpasswd 0 0


The IP address '192.168.1.4' is the IP of the Windows box by the way.

That should be it! Now just manually mount it (since it's in the /etc/fstab, it will mount automatically on the next reboot provided your windows box is up and sharing):

Code:
# mount /myth/video/share


That should be it!

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


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 16 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:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu