Author Topic: [SOLVED] Mounting (NAS-323) Windows Share on 810.A2.26  (Read 22944 times)

ccoudsi

  • Guru
  • ****
  • Posts: 244
    • View Profile
[SOLVED] Mounting (NAS-323) Windows Share on 810.A2.26
« on: August 01, 2009, 08:20:06 pm »
After switching to 810, I found a problem playing music from the \NAS-323\sharedfolder\ (No Password) on the squeezebox, there was no issue using the same shared folder “Multimedia” on 710 setup, debugging this with ColinJones, we found out there is a permissions/ownership problem, the shared Folder mount has a “501” user access, searching the core users/Group, there is no such a user or Group. We suspect this user came from the NAS!!
Code: [Select]
linuxmce@dcerouter:~$ ls -al /mnt/device
total 4
drwxr-xr-x 3 root root    0 2009-07-30 16:20 .
drwxr-xr-x 4 root root 4096 2009-07-29 20:20 ..
drwxrwx--- 7  501  501    0 2009-06-17 23:15 92
linuxmce@dcerouter:~$ ls -al /mnt/device/92
ls: cannot open directory /mnt/device/92: Permission denied

FYI Here's the output of the mount command
Code: [Select]
//192.168.80.139/Multimedia on /mnt/device/92 type cifs (rw,mand,unc=\\192.168.80.139\Multimedia,username=guest,posixpaths,acl,rsize=16384,wsize=57344)
linuxmce@dcerouter:~$

Please see this thread for complete info.
http://forum.linuxmce.org/index.php?topic=8078.msg58002#msg58002

Can someone please compare your results, and give us any recommendations on how we can override these options without breaking the automouting system so that we can check if that is the issue.
Thanks
« Last Edit: August 05, 2009, 07:22:49 am by ccoudsi »
Cheers |[BEER]
Charlie,

pigdog

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1105
    • View Profile
Re: Mounting (NAS-323) Windows Share on 810.A2.26
« Reply #1 on: August 02, 2009, 02:52:24 am »
Hi,

Not sure if this is what your looking for but from my Fedora box if I connect to my DNS-323

smbclient //NAS-1/volume_1 -U

And since I presently have no username/password when prompted I hit enter.

Enter Pigdog's password:
Domain=[LINUXMCE] OS=[Unix] Server=[Samba 3.0.24]
Server not using user level security and no password supplied.
smb: \>

If you have a username/password you enter...

smbclient //NAS-1/volume_1 -U username

Enter username password:

A stat command on the box shows that uid&gid is 501.

smb: \> stat public
File: \public
Size: 0              Blocks: 0   directory
Inode: 76808193   Links: 3
Access: (0777/drwxrwxrwx)   Uid: 501   Gid: 501
Access: 2009-08-01 11:21:49 -0400
Modify: 2009-07-07 23:50:49 -0400
Change: 2009-07-07 23:50:49 -0400

There is a chown on the DNS but I haven't tried it.

smb: \> help chown
HELP chown:
   <src> <uid> <gid> chown a file using UNIX uids and gids

That's probably where 501 is coming from.

ccoudsi

  • Guru
  • ****
  • Posts: 244
    • View Profile
Re: Mounting (NAS-323) Windows Share on 810.A2.26
« Reply #2 on: August 02, 2009, 03:49:30 am »
pigdog, thank you very much this explains the problem.
Here's my output using terminal windows from the core
Code: [Select]
linuxmce@dcerouter:~$ smbclient //Dns-323/volume_1 -U
Enter linuxmce's password:
Domain=[LINUXMCE] OS=[Unix] Server=[Samba 3.0.24]
Server not using user level security and no password supplied.
smb: \> stat public
File: \public
Size: 0                 Blocks: 0       directory
Inode: 168919041        Links: 3
Access: (0777/drwxrwxrwx)       Uid: 501        Gid: 501
Access: 2009-07-31 21:11:09 -0700
Modify: 2009-01-25 10:29:13 -0800
Change: 2009-01-25 10:29:13 -0800
smb: \>
According to Colin this should not happens, possible a bug in 810 mounting, should I file this in the Trac??
Cheers |[BEER]
Charlie,

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Mounting (NAS-323) Windows Share on 810.A2.26
« Reply #3 on: August 02, 2009, 03:56:22 am »
as a clarification - I haven't said that this shouldn't happen on 0810, I merely pointed out that this is not what happens on 0710. Either it is the source of your problem, or perhaps this is normal for 0810 and it is a red herring, I simply don't know. (I don't have 0810 to test)

What we need is someone with 0810 and a NAS/Windows share that is working (but not a DNS unit) to post here and tell us what they see when they do the same thing. And particularly what the ownership and permissions are of their /mnt/device/<dev#> directory is when they ls -al it.

If it is drwxrwxrwx and root:root then I think we can safely say that this is your issue, and there is an update required to 0810's mounting system to take that into account and ensure that DNS devices are mounted as drwxrwxrwx root:root rather than drwxrwx--- 501:501

However, if everybody else also gets something like you for their mounts, then it is probably just a red herring (ie normal for 0810), but I would like to know whether they can cd into that directory, as that does seem to be the critical issue here.

ccoudsi

  • Guru
  • ****
  • Posts: 244
    • View Profile
Re: Mounting (NAS-323) Windows Share on 810.A2.26
« Reply #4 on: August 02, 2009, 05:28:09 am »
Colin,
I apologize, I just went back to DNS web configuration because I remembered I updated the NAS FW to the latest 1.07, I saw UPnP AV Server was enabled by default, that's why I was getting the 501 access, now after rebooting the NAS I saw the access for the shared folder "102" changed to "root" from 501 "ls -al /mnt/device", I believe it should be pluto_charlie is this correct?? Becasue I still need SUDO to see the content of the "ls -al /mnt/device/102"
Code: [Select]
linuxmce@dcerouter:/home/public/data/audio$ ls -al
total 12
drwxrwsr-x  3 root          public 4096 2009-07-31 20:57 .
drwxrwsr-x 11 root          public 4096 2009-07-31 22:44 ..
drwxrwsr-x  2 pluto_charlie public 4096 2009-07-18 20:15 Arabic Helene 1
lrwxrwxrwx  1 root          public   33 2009-07-31 20:57 Windows Share-Multimedia [102] -> /mnt/device/102/public/data/audio
linuxmce@dcerouter:/home/public/data/audio$ cd /mnt/device/102/
bash: cd: /mnt/device/102/: Permission denied
linuxmce@dcerouter:/home/public/data/audio$
UPDATE1
=======
Sorry back to square one, the mount still "501", I got it confused with the link access, and this also after reinstalling the NAS on the third time, disabling uPnP AV server settings didn't change anything
Code: [Select]
linuxmce@dcerouter:/mnt/device$ ls -al
total 4
drwxr-xr-x 3 root root    0 2009-08-01 21:13 .
drwxr-xr-x 4 root root 4096 2009-08-01 21:10 ..
drwxrwx--- 7  501  501    0 2009-06-17 23:15 102
linuxmce@dcerouter:/mnt/device$ cd /home/public/data/audio/
linuxmce@dcerouter:/home/public/data/audio$ ls -al
total 12
drwxr-xr-x  3 root          public 4096 2009-08-01 21:11 .
drwxrwxr-x 11 root          public 4096 2009-08-01 21:11 ..
drwxrwsr-x  2 pluto_charlie public 4096 2009-07-18 20:15 Arabic Helene 1
lrwxrwxrwx  1 root          public   33 2009-08-01 21:11 Windows Share-Multimedia [102] -> /mnt/device/102/public/data/audio
linuxmce@dcerouter:/home/public/data/audio$
UPDATE 2
=======
I'm not sure if this will help, but I was able to rip a music CD (11songs in 20Minutes??) into the NAS and play it back on the MD, but not the Squeezebox
« Last Edit: August 02, 2009, 07:57:22 am by ccoudsi »
Cheers |[BEER]
Charlie,

pigdog

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1105
    • View Profile
Re: Mounting (NAS-323) Windows Share on 810.A2.26
« Reply #5 on: August 02, 2009, 07:29:14 pm »
I don't know if its of any use to you but DNS-323...

uid 500 = admin
uid 501 = nobody

If you create a username/password on the dns uid = 502.

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Mounting (NAS-323) Windows Share on 810.A2.26
« Reply #6 on: August 02, 2009, 11:32:59 pm »
Pigdog - do you have a PC at all?? We seem to be having difficulty attracting attention from anyone else!

If you do, can you plug it into your internal network and share out a folder? Then tell LinuxMCE to add it once it is detected. Then check the above to see how LinuxMCE 0810 sees the permissions and ownership under /mnt/devices

btw, ccoudsi - you did try pigdogs trick of adding client lanman auth = yes into your smb.conf didn't you? That is a fix for a new level of security that Kubuntu required from 0804 onwards, and could be the thing that changes permissions/ownership on the mount.
« Last Edit: August 02, 2009, 11:45:57 pm by colinjones »

pigdog

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1105
    • View Profile
Re: Mounting (NAS-323) Windows Share on 810.A2.26
« Reply #7 on: August 03, 2009, 02:04:12 am »
HI,

Connected a old 20G drive to my Fedora and installed WIN2K.

Did an ipconfig and was address of 192.168.80.131 and gateway of 192.168.80.1 so I guess it worked.

Why is LinuxMCE detecting a DCS-5300G, Axis IP camera, Hauppauge MediaMVP and 2 Aastra SIP phones?

Did 'No, ignore at this time'.

Anyway added it as File Server.  Reloaded Router.  Might not be good because Fedora is dhcp.

I was asked for username/password for both drives.

I made directory just public.  Created drives are 53 and 54.

DNS-323 is drive 50 and 51.

From LinuxMCE (no username/password on DNS)


ls -al /mnt/device
total 4
drwxr-xr-x 6 root root     0 date .
drwxr-xr-x 4 root root  4096 date ..
dr-xr-xr-x 2 root root     0 date 50
dr-xr-xr-x 2 root root     0 date 51
dr-xr-xr-x 2 root root     0 date 53
dr-xr-xr-x 2 root root     0 date 54


ls -al /mnt/device/50
total 50
drwxrwxrwx 5 root root 0 date .
drwxr-xr-x 6 root root 0 date ..
-rwxrwxrwx 1  501  501 0 date .check_mounted
drwxrwxrwx 3  501  501 0 date public
drwx------ 2 root root 0 date .systemfile
drwxrwxrwx 3  501  501 0 date user_1

Mounting 51 provided similar results.

Trying to mount 53 and 54 provided No such file or directory.

I don't really think I'd have to go much further with permissions because I can mount my DNS-323 no problem.
the . & .. directories plus .systemfile are root on DNS.  The created files are 501 - nobody (all access r/w privilages)

My smb.conf has both

lanman auth = yes
client lanman auth = yes

but I have no username/password in DNS or required in device tree.

Is the DNS setup as all acess against each share with read write checked?

I will play around a bit to see if I can get WIN2K uid gid stuff on shared files in a directory.
« Last Edit: August 03, 2009, 04:42:07 am by pigdog »

ccoudsi

  • Guru
  • ****
  • Posts: 244
    • View Profile
Re: Mounting (NAS-323) Windows Share on 810.A2.26
« Reply #8 on: August 03, 2009, 06:36:10 am »
Colin,
Yes, I did the modification in the beginning,
Quote
adding client lanman auth = yes into your smb.conf
but because I was using user=all which means no password, I removed it.

I just purchased another NS4300N Promise Technology NAS just to test it with LinuxMCE, I've been using these NAS for a while, I just changed the workgroup to linuxmce, and added 1 drive for testing, it was PnP, I selected Public folder to use, it asked me for username/password, and voila I ripped another music CD to it and now i'm lisneting to it on my Squeezebox as I'm writting this post.
Here's the output for both shares DNS-323 & NS4300N

Code: [Select]
linuxmce@dcerouter:/mnt/device$ ls -al
total 4
drwxr-xr-x 4 root root    0 2009-08-02 21:00 .
drwxr-xr-x 4 root root 4096 2009-08-01 21:10 ..
drwxrwx--- 7  501  501    0 2009-06-17 23:15 102
drwxrwxrwx 6 root root    0 2009-08-02 09:59 104
linuxmce@dcerouter:/mnt/device$ cd /home/public/data/audio/
linuxmce@dcerouter:/home/public/data/audio$ ls -al
total 12
drwxrwsr-x  3 root          public 4096 2009-08-02 20:59 .
drwxrwsr-x 11 root          public 4096 2009-08-02 21:00 ..
drwxrwsr-x  2 pluto_charlie public 4096 2009-07-18 20:15 Arabic Helene 1
lrwxrwxrwx  1 root          public   33 2009-08-02 20:59 Windows Share-Multimedia [102] -> /mnt/device/102/public/data/audio
lrwxrwxrwx  1 root          public   33 2009-08-02 20:59 Windows Share-PUBLIC [104] -> /mnt/device/104/public/data/audio
linuxmce@dcerouter:/home/public/data/audio$ cd Windows\ Share-PUBLIC\ \[104\]
linuxmce@dcerouter:/home/public/data/audio/Windows Share-PUBLIC [104]$ ls -al
total 0
drwxrwxr-x 2 root public 0 2009-08-02 09:58 .
drwxr-xr-x 8 root    300 0 2009-08-02 09:58 ..
linuxmce@dcerouter:/home/public/data/audio/Windows Share-PUBLIC [104]$

Here's my smb.conf
Code: [Select]
[global]
## BEGIN : Domain and Hostname

        workgroup = LinuxMCE
        server string = DCERouter
        netbios name = DCERouter

## END : Domain and Hostname
        smb ports = 139
        log level = 2
        invalid users = root
        log file = /var/log/samba/log.%m
        max log size = 1000
        syslog = 0
        encrypt passwords = true
        socket options = TCP_NODELAY
        dns proxy = no
        passwd program = /usr/bin/passwd %u
        passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
        username map = /etc/samba/usermap.txt
        unix extensions = yes
        security = user

[public]
As far the Dlink NAS, not sure what to do???

Update2:
=======
I compared both configuration DNS-323 & NS4300N in the WebAdmin, there is 2 items are difference in the shared Folder first the read only check box in the DNS323 it says read only where in the NS4300N it is not checked, the second item is the admin username & password, so I added that to DNS-323 and I got the following output:
Code: [Select]
linuxmce@dcerouter:~$ cd /mnt/device/
linuxmce@dcerouter:/mnt/device$ ls -al
total 4
drwxr-xr-x 4 root root    0 2009-08-02 21:51 .
drwxr-xr-x 4 root root 4096 2009-08-01 21:10 ..
dr-xr-xr-x 2 root root    0 2009-08-02 21:49 102
drwxrwxrwx 6 root root    0 2009-08-02 10:50 104
linuxmce@dcerouter:/mnt/device$ ls -al /home/public/data/audio/
total 12
drwxrwsr-x  3 root          public 4096 2009-08-02 21:49 .
drwxrwsr-x 11 root          public 4096 2009-08-02 21:50 ..
drwxrwsr-x  2 pluto_charlie public 4096 2009-07-18 20:15 Arabic Helene 1
lrwxrwxrwx  1 root          public   33 2009-08-02 21:49 Windows Share-Multimedia [102] -> /mnt/device/102/public/data/audio
lrwxrwxrwx  1 root          public   33 2009-08-02 21:49 Windows Share-PUBLIC [104] -> /mnt/device/104/public/data/audio
linuxmce@dcerouter:/mnt/device$ $
But still I can not "cd" to "Windows Share-Multimedia [102]" also on reboot I got a lot of CIFS VFS: send error....
It looks like it goes offline from the WebAdmin!!!I tried to check the box and reload, after it reload it says online but when I do "mount" it is not there only NS4300N, but when I do "ls -al /mnt/device" I see DNS-323 but not NS4300N, very confusing
Code: [Select]
//192.168.80.144/PUBLIC on /mnt/device/104 type cifs (rw,mand,unc=\\192.168.80.144\PUBLIC,username=admin,posixpaths,acl,rsize=16384,wsize=57344)
linuxmce@dcerouter:/home/public/data/audio$ cd /mnt/device/
linuxmce@dcerouter:/mnt/device$ ls -al
total 4
drwxr-xr-x 3 root root    0 2009-08-02 22:04 .
drwxr-xr-x 4 root root 4096 2009-08-01 21:10 ..
dr-xr-xr-x 2 root root    0 2009-08-02 21:49 102
linuxmce@dcerouter:/mnt/device$
« Last Edit: August 03, 2009, 07:27:50 am by ccoudsi »
Cheers |[BEER]
Charlie,

gadget

  • Veteran
  • ***
  • Posts: 136
    • View Profile
Re: Mounting (NAS-323) Windows Share on 810.A2.26
« Reply #9 on: August 04, 2009, 01:25:10 pm »
I don't know if this is related but I have a Fedora 11 box that i have configured as a NAS server. Once I got passed the configuration stage of letting LMCE create the folder structure my Media was not visible on the orbiter. I did some digging around in the storage/network scripts and had to add  "client lanman auth = yes"  to the script "Network_Setup.sh", or you can add it directly to smb.conf.

I found that StorageDevices_StatusRadar.sh checks if a device is online using the smbclient as follows, and was always failing.
Code: [Select]
smbclient -U $Share_Username%$Share_Password "//$Device_IP/$Share_Name" -c 'pwd' 1>/dev/null 2>/dev/null


to test if your NAS device is online run this script from the core. If it returns 1 then your device is online.
Code: [Select]
/usr/pluto/bin/StorageDevices_StatusRadar.sh background


This solved my problem, hope it helps.

gadget

pigdog

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1105
    • View Profile
Re: Mounting (NAS-323) Windows Share on 810.A2.26
« Reply #10 on: August 04, 2009, 01:51:12 pm »
Hi gadget,

For clarification...on the DNS-323 if you have an username/password programmed Fedora or LMCE needs client lanman auth = yes in smb.conf or Network_Setup.sh to login.

On LMCE the share volumes under device tree need username/password fields programmed and use password checked.

If your are not using username/password then client lanman auth = yes is not required in smb.conf and no programming is required in LMCE share volumes.

All you need for LMCE is workgroup=linuxmce in either case.

Cheers.

gadget

  • Veteran
  • ***
  • Posts: 136
    • View Profile
Re: Mounting (NAS-323) Windows Share on 810.A2.26
« Reply #11 on: August 04, 2009, 02:13:36 pm »
Hi Pigdog,

You are correct. I did a test with smbclient using smbclient - u ""%"" and lanman auth is not required.
However i still think the Network_Setup.sh script requires the lanman auth for anyone adding a NAS that would like it to be secure by using a username/password.

gadget

pigdog

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1105
    • View Profile
Re: Mounting (NAS-323) Windows Share on 810.A2.26
« Reply #12 on: August 04, 2009, 02:25:59 pm »
Hi,

Secured networks = yes.

Unfortunately the DNS-323 support only password=share (windows weak passwords) and not password=domain.  That's why you have to use lanman auth.

The DNS uses a modified Linux distro the only way to get around it is to hack it with ffp (fonz fun_plug) plus other steps.

To get around streaming audio for ccousdi he might have to go this route and look at http://wiki.dns323.info/.

Thanks.

ccoudsi

  • Guru
  • ****
  • Posts: 244
    • View Profile
Re: Mounting (NAS-323) Windows Share on 810.A2.26
« Reply #13 on: August 04, 2009, 09:16:21 pm »
Gadget,
I run “/usr/pluto/bin/StorageDevices_StatusRadar.sh background”
Here’s the output, they are both online!!
Code: [Select]
Tue, 04 Aug 2009 12:03:16 -0700 Device 101 (192.168.80.139) is online trying each of samba kids to see it they are still available
Tue, 04 Aug 2009 12:03:16 -0700 ----------------- DEVICE 102 1 (unchanged)
Tue, 04 Aug 2009 12:03:16 -0700 Device 103 (192.168.80.144) is online trying each of samba kids to see it they are still available
Tue, 04 Aug 2009 12:03:16 -0700 ----------------- DEVICE 104 1 (unchanged)

Here’s the results of my latest try.
I just went back to DNS-323, created a user “charlie” & password, assigned it to the shared folder "Multimedia", then I modified the “smb.conf“ I added the following line to the [Global] section:
lanman auth = yes
client lanman auth = yes

Then I went to WebAdmin and modified the Multimedia share folder, I added user “charlie” & password I checked the checkbox “required password” rebooted the core I got a lot of these messages

Code: [Select]
[  469.667819]  CIFS VFS: cifs_read_super: get root inode failed
[  470.362566]  CIFS VFS: Send error in QFSAttributeInfo = -5
[  470.363052]  CIFS VFS: Send error in QFSUnixInfo = -5
The results of this trial is, 102 share has root access now not 501, I can cd to it, but when I do “ls –al” I get no such file or directory???
Code: [Select]
linuxmce@dcerouter:/mnt/device$ ls -al
total 4
drwxr-xr-x 4 root root    0 2009-08-04 11:24 .
drwxr-xr-x 4 root root 4096 2009-08-04 11:01 ..
dr-xr-xr-x 2 root root    0 2009-08-04 11:01 102
drwxrwxrwx 6 root root    0 2009-08-04 00:23 104
linuxmce@dcerouter:/mnt/device$
linuxmce@dcerouter:/mnt/device$ cd 102
linuxmce@dcerouter:/mnt/device/102$ ls -al
ls: cannot open directory .: No such file or directory
linuxmce@dcerouter:/mnt/device/102$
Not sure what to do anymore on the D-link NAS, the NS4300N working as expected no issues,

Pigdog,
What is the FW version of your DNS-323, mine is 1.07??
« Last Edit: August 04, 2009, 09:35:39 pm by ccoudsi »
Cheers |[BEER]
Charlie,

pigdog

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1105
    • View Profile
Re: Mounting (NAS-323) Windows Share on 810.A2.26
« Reply #14 on: August 04, 2009, 09:33:55 pm »
Hi,

I tried 1.08 alpha but went back to 1.07.

Just to verify on the DNS. 

When you created user group charlie you deleted the volume shares ALL and then created new volume shares with user group charlie r/w oplocks and archive = yes...