Page 1 of 2

Adding Windows shared folder to Subsonic running on Ubuntu

PostPosted: Sat Jun 25, 2011 10:54 pm
by ACTPOHABT
Hello there!

I'm trying to add folder that is located on my second pc running windows 7 to Subsonic's "Music folders" tab under Ubuntu 11.04. It shows mounted in Nautilus as smb://my-pc/users/USERNAME/Music. Does anyone know what the correct path would be when I add it in Subsonic "Music folders" menu in web browser? Thank you!

PostPosted: Sat Jun 25, 2011 11:25 pm
by GJ51
Just open windows explore (Not IE) and browse to the folder. Click on the address line and copy the share address that windows uses. If it's a local drive, just use the \\Computername\directory\subdirectory.

e.g.: \\MAPLEGROVE\Music\Music CD

PostPosted: Sat Jun 25, 2011 11:50 pm
by ACTPOHABT
GJ51 wrote:Just open windows explore (Not IE) and browse to the folder. Click on the address line and copy the share address that windows uses. If it's a local drive, just use the \\Computername\directory\subdirectory.

e.g.: \\MAPLEGROVE\Music\Music CD


I'm on Ubuntu. The folder with music is shared from Windows 7 PC. And by the way, do I use back slashes or forward slashes?

PostPosted: Sun Jun 26, 2011 12:01 am
by GJ51
Sorry, I'm just a Windows guy. I can access dhares on any computer on my network using the format I described above. I think that conforms to UNC. On my systems \\MAPLEGROVE\Music\OGG Music\Buffalo Springfiled would be an example of how to access a folder on a different computer.

Give that a try. I'm not sure what you have to do in Ubuntu to set up autorization for folder access, but the basic format should be correct.

PostPosted: Sun Jun 26, 2011 12:06 am
by ACTPOHABT
Tried everything. Nothing worked. That's why I posted here :)

PostPosted: Sun Jun 26, 2011 12:17 am
by GJ51
Sorry, I can only give you info from the Windows side, hopefully one of the Linix guys will chime in. If you don't get a post soon try sending a pm to one of the more frequent Linix posters.

Re: Adding Windows shared folder to Subsonic running on Ubun

PostPosted: Sun Jun 26, 2011 3:36 pm
by Aethies
ACTPOHABT wrote:Hello there!

I'm trying to add folder that is located on my second pc running windows 7 to Subsonic's "Music folders" tab under Ubuntu 11.04. It shows mounted in Nautilus as smb://my-pc/users/USERNAME/Music. Does anyone know what the correct path would be when I add it in Subsonic "Music folders" menu in web browser? Thank you!


I am testing that now. I am not sure how it is going to work since Windows 7 has incorporated sharing only in your HOMEGROUP. I am building some additional network tools to try to connect to my windows 7 box from my Gentoo box. I will let you know what I find. I am hoping I just get a prompt for the homegroup password and it allows me access. I don't have high hopes though, given how M$ is notorious for not playing nice with Linux.

Be getting back to you soon.

Re: Adding Windows shared folder to Subsonic running on Ubun

PostPosted: Sun Jun 26, 2011 4:39 pm
by Aethies
ACTPOHABT wrote:Hello there!

I'm trying to add folder that is located on my second pc running windows 7 to Subsonic's "Music folders" tab under Ubuntu 11.04. It shows mounted in Nautilus as smb://my-pc/users/USERNAME/Music. Does anyone know what the correct path would be when I add it in Subsonic "Music folders" menu in web browser? Thank you!


Ok, so good news. I was initially presented with a credentials screen, so I entered them in. I was able to see shares on my windows 7 pc including the specific folder that I shared. That being said, you can do this easily.

1. You need to make sure the network share is mounted in ubuntu on startup if you want to have access all the time to this music folder in subsonic.

2. Once you have this network share mount point, then you can point subsonic to the share.

I think what you are trying to do is tell subsonic the network share name. That could be your problem.

In your /etc/fstab, at the bottom, add the following line in the exact format as this:
Code: Select all
//win-pc/folder that is shared   /media/music    cifs    username=server_user,password=server_password,uid=1000,gid=users 0 0


So you are telling ubuntu to mount win-pc/musicfolder to /media/music using cifs (samba). I found that line regarding the username on forums that allows you to mount it with no user/pass.

When you have saved your /etc/fstab, don't forget to create the /media/music folder.
Code: Select all
# mkdir /media/music
# chown yourusername:yourusername /media/music (this changes the owner of the folder to you, instead of root)


Now that that line is in fstab, it will mount it at boot time. You can manually mount it with the following:
Code: Select all
# mount /media/music


Once that is mounted, in Subsonic, point your music folder to /media/music

NOTE: sudo works as well, i.e. sudo mount /media/music if you are not root.

Hope this helps. If you need any further info, please send me a pm.

Aethies

PostPosted: Mon Jun 27, 2011 9:43 pm
by ACTPOHABT
You are my savior! Thank you so much!
Instead of "win-pc" had to enter internal IP address (10.0.0.X) and media/music folder had to go inside of my home directory. The rest left unchanged. Everything works now!
Thank you again!!!

PostPosted: Tue Jun 28, 2011 10:48 am
by baaldemon
I would recommend using a credentials file rather than having your plaintext credentials in the world readable fstab file. Its the same syntax as what is already listed, but rather than having username=un,password=pw replace that with credentials=/etc/.smbpass (you can name the file whatever you want)

and then in the file /etc/.smbpass
Code: Select all
username=user
password=password


Then run
Code: Select all
chmod 600 /etc/.smbpass
chown root:root /etc/.smbpass

PostPosted: Tue Jun 28, 2011 1:39 pm
by Aethies
baaldemon wrote:I would recommend using a credentials file rather than having your plaintext credentials in the world readable fstab file. Its the same syntax as what is already listed, but rather than having username=un,password=pw replace that with credentials=/etc/.smbpass (you can name the file whatever you want)

and then in the file /etc/.smbpass
Code: Select all
username=user
password=password


Then run
Code: Select all
chmod 600 /etc/.smbpass
chown root:root /etc/.smbpass


I didn't want to get too cryptic in mounting shares. But that is definitely recommended to ensure a more secure setup.
Thanks!

Network share question

PostPosted: Sat Jul 30, 2011 4:55 pm
by Fastbob
Aethies, you are my hero!
I have look up and down the internet to get this thing going as you described.

I have tried to get it going but somehow I did not reach the finish line yet.
My situation: I have NAS where my music and movies are stored.
The NAS has users w. passwords.

My Subsonic is running on webserver with ClearOS 5.1 (a linux based free all-in-one package). Subsonic installed etc. It works besides the network share (it works on my windows server where I have logged on to the NAS)

Now, excuse me for asking these simple questions but somehow I am missing something, somehere.
I have followed your guideline and tried several options regarding the usernames but I did not manage yet to get it working.

I have added the share in the fstab file. I do suppose my actual login data for the NAS should be used after "cifs".....right?

I entered "mkdir" command at the command line of my midgnight commander and added the chown command to. But tell me what username:username should be used here?
Or should I add both incl. the mount command to a specific file (fstab??)
I suppose if I enter this in a file it would mount automatically when I boot.

The strange thing is that since I tried this Subsonic did not show the "no media folders found" error but my music is not shown (yet).

Thanks!
Fastbob

PostPosted: Sat Jul 30, 2011 5:13 pm
by Aethies
Yes.. if the line is in fstab, it will mount it upon boot.


Code: Select all
//win-pc/folder that is shared   /media/music    cifs    username=server_user,password=server_password,uid=1000,gid=users 0 0


the only thing you need to change in this line is the //win-pc/folder and the /media/music. The rest should stay the same.

One thing I forgot to mention.. when you add this line into the fstab, you can then mount the share manually by typing

Code: Select all
# mount /media/music


it will pull the settings from the fstab.

let me know if that helps

PostPosted: Sun Jul 31, 2011 10:01 am
by Fastbob
Hi Aethies,

Yes, it took some time but it works, Super!!

4.092 artiesten
1.675 albums
25.119 nummers
701,82 GB (~ 10.902 uur)

Many thanks.

Fastbob

Re: Adding Windows shared folder to Subsonic running on Ubun

PostPosted: Sat Aug 20, 2011 9:14 pm
by Ian090471Wheeler
Hello folks

new here, first things first: nice app

This is the sort of stuff I am trying to do, but without the technical level of knowledge you guys have.

I am running subsonic 4.5 (build 2385) – August 11, 2011 on an xp sp3 machine and trying to access through a android tablet M7 (android 2.2 - 2.3).

Set up all ok - (only user on subsonic admin) can access my music on my c: on the tablet but no joy on the NAS I mapped to my pc (linkstation). I have tried to change the log in tab on the service but no good. All I get is "Could not Start Subsonic service on Local Computer Error 1069: The service did not start due to log on failure"
I have tried user Admin no password and my log in no password, but not joy (no passwords set up)

Can you help me with what I am missing?
Can you point me in the right direction please ?

Also, on my tablet I can not see my internet radio set up in web brouser when I log on with my tablet it would be nice to see it, can I?

Also last question if I sort the Nas problem out can I access direct without having to turn on my pc, that would be really cool?