LinuxMCE Forums

General => Users => Topic started by: pigdog on July 11, 2009, 07:29:20 pm

Title: Solution-Two options: How can I make NAS device stay Online?
Post by: pigdog on July 11, 2009, 07:29:20 pm
I have a D-Link 323 NAS with 2 share volumes.  

Has   -username and password
   -use automatically
   -cifs
   -password required
   -readonly

but online has to be manually set.

How can I get Online active on boot?

P.S.  Device & Share volumes say Registered: no.
Title: Re: How can I make NAS device stay Online?
Post by: jimmejames on July 11, 2009, 08:00:51 pm
I'm guessing you're using 810...  I have the same nas and the same problem.  I've tried putting it on the internal and external networks but get the same results.  I've also experienced that it seems to only go offline when I turn on some MDs and not others.

I'm also guessing that you at some point used 710 and, like me, did not experience this issue.

Btw, setting the system so it sends a singal every 5secs or so to keep the device online did not work for me.

I'm still obviously trying to figure it out so if you find a solution please share.
Title: Re: How can I make NAS device stay Online?
Post by: pigdog on July 11, 2009, 08:18:51 pm
Hi jimmejames,

Yes to the above.

I started with another problem and eventually ended up with no online.

I have reloaded from scratch.  Deleted the device from the device tree/pnpqueue etc., allowed re-discovery but no go.

You are using passwords - correct?

Will keep you informed.

Title: Re: How can I make NAS device stay Online?
Post by: jimmejames on July 12, 2009, 12:15:21 am
Yes, passwords and all media public.

I need to seriously play with it some more now that someone else has experienced the same.

I'm convinced that LMCE doesn't think it is offline, it only tells you that it is.  That is to say that if I have music playing on a MD and I turn on another MD (one that I know pushes the DNS-323 offline- my Dell Latitude 800) and no matter what MD I clicked on the audio button on, the list was not populated, even on the MD where the music was playing.  But, if I went to the remote on the MD where the music was playing (and still was even though the device was listed as offline) I could change songs and everything would play as though the device was still online.

To get the audio displayed on the MDs, I need to log into the admin pages, click the button to put the DNS-323 online and then quick reload the router. 

Couple things I want to try:
1) When audio is playing on one MD and not displayed under the audio button (repeatable by doing the above steps) use the follow me feature to push the audio onto a different MD to see if the audio plays
2) confirm that only some MDs push the DNS offline- I think I remember at least one not affecting the status
3) put a couple videos on this DNS to see if it's just an audio issue or if the video is affected as well


There was a post a year or so back (I think I recall) that talked about a MAC address or IP address range that was used to determine particular devices.  I think it was MAC addresses and that all starting with XX:XX:XX.whatever were say a camera and XX:XX:X1.whatever are NASes.  My DNS when it first configures comes up as a DLink camera and two other unrelated things.

Not sure that any of this helps
Title: Re: How can I make NAS device stay Online?
Post by: totallymaxed on July 12, 2009, 01:48:20 am
I have a D-Link 323 NAS with 2 share volumes.  

Has   -username and password
   -use automatically
   -cifs
   -password required
   -readonly

but online has to be manually set.

How can I get Online active on boot?

P.S.  Device & Share volumes say Registered: no.

Hmmm...my response in this thread was about keeping storage from going off-line because of some bugs in the way the storageRadar scripts handle storage devices. Those bugs have not been fixed in the current 0810 builds;

http://forum.linuxmce.org/index.php?topic=7636.msg49121#msg49121 (http://forum.linuxmce.org/index.php?topic=7636.msg49121#msg49121)

The above might be of help...

Andrew
Title: Re: How can I make NAS device stay Online?
Post by: jimmejames on July 12, 2009, 02:14:25 am
Did anything chaned (delibertly) from 710 to 810 in regards to how lmce handles remote storage?  It's just odd that this wasn't an issue before and I would like to know where to behin looking if you have suggestions
Title: Re: How can I make NAS device stay Online?
Post by: colinjones on July 12, 2009, 10:49:19 am
Can't really help with the underlying issue other than what I have already told pigdog in another thread. But I can say that the online tick box is a little misleading. The storageradar under some circumstances (such as the cifs/smbfs issue) thinks the storage is offline even though it isn't really. And marks it as such. But that is really only used by the Orbiter SQL queries to determine which media to display and which not to.

Neither Xine (the actual media player) nor UpdateMedia (the library scanning component) take any notice of this tick box... so if the media actually is online, UpdateMedia scans the media into the library, with attributes, etc, but perversely then notes that the device is supposedly offline and marks the media as missing! But it does populate the database... and Xine will happily play the media too, because of a bug in the search function it actually allows you to search for media that otherwise wouldn't be displayed because it is "offline" and allows you to play it, even though those files don't appear in the normal media grids. Hence the behaviour you are seeing.

Using Totallymaxed's approach is one step, but it would be worthwhile switching from cifs to smbfs as well as that also causes an "offline" issue. You only need tick the box and hit Save, not reload the router. It usually takes about 5-10 before it switches back to offline, if its going to, so wait, then hit refresh and see if it sticks. This particular issue is usually associated with numerous CIFS VFS errors on the console, some are normal, but I think that -111 is one of the error numbers..
Title: Re: How can I make NAS device stay Online?
Post by: pigdog on July 12, 2009, 07:35:58 pm
Hi,

I upgraded my DNS-323 to version 1.07 (from 1.04).

I noticed some timers were now disabled.

I removed all username/password stuff on the DNS-323 and made all accounts read/write.

I reloaded from scratch.

I had to apt-get install libdvdread3 (dvdnav downloaded as part of package).  That was odd (I'll check install log later).

Went into device tree for DNS-323 and checked settings.  Share volumes are checked for Auto-assign to parents, Readonly, Online (no Use Automatically).

I have all my media.  After 3 hours no changes.

I powered down Core/Hybrid via menu.  Powered down DNS-323.

Powered up Core/Hybrid and when loaded powered up DNS-323.  Have all my media.  Settings constant.

I reloaded from scratch before but couldn't get media.  http://forum.linuxmce.org/index.php?topic=8488.0

I guess it's fixed but not 100% sure why.  Could be the firmware upgrade on DNS-323.

What version are you at jimmejames?
Title: Re: How can I make NAS device stay Online?
Post by: jimmejames on July 12, 2009, 08:15:37 pm
1.05, but I'm going to go to 1.07 and post my results.


Thanks for the info
Title: Re: How can I make NAS device stay Online?
Post by: jimmejames on July 12, 2009, 08:37:22 pm
Sweet- thanks pigdog.   Updating to 1.07 seems to have fixed the problem.  

I started my Latitude which always sent the device offline and all of the media was there.  I didn't change anything in LinuxMCE, only updated the firmware and reloaded the router.

Mine is set up the same- read only, auto assign, online, but I am using a password.


Thanks again


Pigdog- try doing a quick reload of the router.  I've found that this kicks the NAS offline and I have to go to the admin pages and then reload.  But I am to start MDs without it going offline.
Title: Re: How can I make NAS device stay Online?
Post by: pigdog on July 12, 2009, 11:23:40 pm
Hi jimmejames,

From the menu bar I did a Quick reload and when finished went into KDE and checked the device tree in webadmin (already set up).

Both share volumes were still checked Online.

Maybe probably is related to using a password and the device needs to reconnect.

Have you tried letting it sit for a few minutes to see if it reconnects automatically?

I was wondering if an UpdateMedia scan which runs every two minutes or so (thank you colinjones for all your help) might kick it.

Anyway, I'll mark this item solved.

Cheers all.
Title: Re: Solution: How can I make NAS device stay Online?
Post by: colinjones on July 13, 2009, 05:31:50 am
Some further info that may help in understanding all this.

Online and mounted are not the same thing. Online is a specific LMCE state, where by a device is marked as "online" in the database, which can then be used in SQL queries to filter which media to display. Whereas, mounted is the underlying Linux concept, where a storage device is mounted into the /mnt/ folder (and symlinked into the correct location under /home/....)

Mounting is handled automatically (by autofs I think) as and when there is access to a given folder - even if that is just a terminal session CD'ing into the folder... hence Andrew's advice.

Thus a share can be both Online and not mounted at the same time. The Online status indicates that the share is available if _needed_, however it won't actually be mounted until something tries to access it. The Online status is checked and set by the StorageRadar, and it is this that will affect whether media is displayed or not, the underlying mounting, done by autofs, is purely functional and should be transparent to LMCE itself. However, as Andrew pointed out, with more than one share, the autofs system has a bug which means that it doesn't mount properly. The terminal/cd approach should fix that. Once that is resolved you can concentrate on keeping the device marked as Online....

I'm not sure what triggers StorageRadar, or whether it is just a periodic thing, but that would be the place to start. You should read through the scripts that implement this and even run them from the command line to try to identify where it thinks your shares are offline rather than online. Not sure exactly which script is responsible for which function, but it should be one of:

/usr/pluto/bin/StorageDevices_Radar.sh
/usr/pluto/bin/StorageDevices_SambaRadar.sh
/usr/pluto/bin/StorageDevices_StatusRadar.sh

Title: Re: Solution: How can I make NAS device stay Online?
Post by: colinjones on July 13, 2009, 06:21:26 am
OK, it does look like most of the testing is done in that last file I listed.

The lines:
Code: [Select]
ping -qnc 1 -W 1 "$Device_IP" &> /dev/null
                HostIsUp=$?
                if [[ "$HostIsUp" != "0" ]] ;then
                        SetKidsOnline "$Device_ID" "0"
                        Log "Device $Device_ID ($Device_IP) doesn't respond to our ping."
                        continue
                fi

Imply that the NAS needs to be pingable, to be considered online... so check that (some security might block ICMPs)

The lines:
Code: [Select]
                        smbclient -U $Device_Username%$Device_Password --list=//
$Device_IP --grepable 2>/dev/null | grep "^Disk" | cut -d'|' -f2 | grep -q "^${S
hare_Name}$"

Imply that the share needs to be either advertised or at least mountable. You should try these in a terminal and see what it returns. If your NAS IP is 192.168.80.200, and your username and password are both "media", then...

smbclient -U media%media --list=//192.168.80.200 --grepable

You might get something like:

Domain=[ILUVATAR] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
IPC|IPC$|Remote IPC
Disk|D$|Default share
Disk|print$|Printer Drivers
Disk|SharedDocs|
Disk|media|
Disk|ADMIN$|Remote Admin
Disk|C$|Default share
Disk|JLL|
Printer|Printer|HP LaserJet 1200 Series PCL
session request to 192.168.80.248 failed (Called name not present)
session request to 192 failed (Called name not present)
Domain=[ILUVATAR] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

The greps and cuts pick out only the Disk shares, and slice out only the second field, which is the sharename. The last grep -q is a logical query, which will return a true status if that share name exists in the list... which is then tested using the if/fi on the next line. You can see it is running 3 separate tests.

The first 2 check 2 different ways to see if the share is visible - if neither approach works, it marks the share Offline. If at least one of them works, it moves on and attempts to see if the share is mountable - if that fails, it marks the share Offline. Only if at least one of the first 2 tests is successful AND the 3rd test is successful, does it mark the share Online.

So you need to simulate these commands, to see which of the conditions is failing for you. I suspect either the ping isn't working, or the shares are not visible (as even if the shares are mountable, if they are not visible, then the share is marked Offline.

Let me know if you need a more detailed explanation of any of this.
Title: Re: Solution: How can I make NAS device stay Online?
Post by: pigdog on July 14, 2009, 04:33:44 am
Hi jimmejames,

Since you programmed passwords did you try colinjones suggestions?

If not, I will program up username/passwords on DNS shares and device tree views to try to determine failing condition.

Cheers.
Title: Re: Solution: How can I make NAS device stay Online?
Post by: colinjones on July 14, 2009, 05:20:26 am
Don't forget trying to ping the NAS first - preferably from your core, using the ping command above. eg...

ping -qnc 1 -W 1 192.168.80.xxx &> /dev/null    (this will not return anything, but set a result code, which you can then test by...)

echo "$?"

If the output is "0" then it can ping your NAS, if it is "1" then it can't.

Let me know if you need any help setting up the troubleshooting tests for the other stuff. Happy to help out.
Title: Re: Solution: How can I make NAS device stay Online?
Post by: pigdog on July 14, 2009, 05:52:13 pm
DNS Password - Reload Router Test.

Code: [Select]
Systems involved: 1 Core/Hybrid, 1 MD & 1 DNS-323 NAS equipped with 2 HDD's (1-TB & 1-500GB).

Test Case 1:  No username/password on DND-323 or on Device Tree Windows Share-Volume views.

Device template -File Server #1837
This device controlled via - Core
IP Address and MAC Address assigned.
Registered: No
Serial Number - ip address.
Description - NAS

Device template - Windows Share #1768
This device controlled via - NAS
Registered: No
PK_Users - Use LMCE's directory structure
Share Name - Volume_#
Filesystem - cifs
Free Disk Space in MBytes - XXXXX
Serial Number - MAC address\Volume_#
Auto-assign to parents room - checked.
Readonly - checked
Online - checked



On Core/Hybrid & MD

main menu Media> Video "LinuxMCE Video File : Title" displayed.  Selected movie plays.



On Core/MD <CTRL/ALT> <F1>  Login
ping -qnc 1 -W 1 192.168.80.xxx &> /dev/null
echo "$?"

Returned "0" - can ping NAS.

(Side note: <CTRL><F7> back to main menu on MD screen refresh slow - Core fine)



On Core via menu Advanced> Quick Reload

On Core/MD - Orbiter screen refreshes. MD runs detection scripts.
NAS can be ping'd.
Check Online status for share volumes - checked.  Media plays.



Test Case 2:  Username/Password programmed on DNS-323.

DNS-323 volume shares set to read/write.  DNS-323 sets oplocks & maparchive = yes automatically when programming users.
Windows shares #1768
- Username/Password - programmed.
- Password Required - checked.
- Online - not checked.

On Core/MD
- Returned "0" - can ping NAS.

Media> Video - NO listings.

Went into Windows shares
- Use Automatically - checked> save.



On Core via menu Advanced> Quick Reload
- Media> Video - NO listings.



Rebooted systems.  When Core running Kinit powered up DNS-323. 
- Received CIFS VFS: Error connecting to socket.  Aborting operation
-          CIFS VFS: cifs_mount failed w/return code = -111
- Returned "0" - can ping NAS.
- Media> Video - NO listings.



On Core did smbclient -U username%password --list=//192.168.80.XXX --grepable
- Domain=[LINUXMCE] OS=[UNIX] Server=[Samba 3.0.24]
- Server requested LANMAN password (share-level security) but 'client lanman auth' is diabled
- tree connect failed: SUCCESS - 0



Then I tried this.

From the website:
http://www.mail-archive.com/ubuntu-bugs@lists.ubuntu.com/msg884832.html

"I didn't remember that share-level security was restricted to lanman
password authentication, but now that I see that, this failure to
connect makes sense. It is not accidental that the client refuses to
negotiate security in such a situation; I still believe this is the
correct default for libsmbclient to use in hardy*, because enabling weak
authentication in the client doesn't just make it possible to use older
servers, it also makes it possible for a man-in-the-middle attacker to
trick your client into using weak authentication when trying to talk to
a newer server, compromising other passwords in the process.

As a workaround, users who need to access security=share servers can add
'client lanman auth = yes' to the [global] section of
/etc/samba/smb.conf on their hardy client systems, to enable negotiation
of this weak authentication protocol."

*In our instance - Intrepid.

So I added the "client lanman auth = yes" to smb.conf, issued a service samba restart and everything now works.



On Core did smbclient -U username%password --list=//192.168.80.XXX --grepable
- Domain=[LINUXMCE] OS=[UNIX] Server=[Samba 3.0.24]
                - Disk|Volume_2|
- Disk[web_page]Enter Our Web Page Setting
- Printer|lp|USB Printer
- Disk|Volume_1|
- IPC|IPC$|IPC Service (DNS-323)
- Domain=[LINUXMCE} OS=[UNIX] Server=[Samba 3.0.24]
- Server|NAS-1|DNS-323
- Workgroup|LINUXMCE|



On Core via menu Advanced> Quick Reload

On Core/MD - Orbiter screen refreshes. MD runs detection scripts.
NAS can be ping'd.
Check Online status for share volumes - checked.  Media plays.



Use Automatically - in Windows Share make no impact if checked or unchecked.  By default is unchecked.


There is presently two options on the DNS-323 firmware version 1.07.
      - Don't use username/password - no authentication required.
      - Use username/password with smb.conf parameter.
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: jimmejames on July 14, 2009, 07:43:52 pm
Sorry- been planning my wedding... Fiancé still believes it is more important than lmce
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: pigdog on July 14, 2009, 08:11:08 pm
Yeah,  my wife has no sense of humour when it comes to "are you at that damn thing AGAIN!".

I just smile, nod dutifully and say 'Yes dear.'
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: colinjones on July 15, 2009, 12:38:36 am
Well done! Now all you need to do is work out a patch for the project that fixes this for such NAS's and doesn't break it for SMB shares that don't use that security option, and submit it!
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: pigdog on July 15, 2009, 04:25:01 am
Hi colinjones,

I wish I had the skill set to do that (work out a patch) but I don't.
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: tschak909 on July 15, 2009, 07:30:15 am
colinjones, this is WHY we actually are supposed to make device templates for specific NASes that don't behave properly.

-Thom
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: colinjones on July 15, 2009, 08:33:44 am
colinjones, this is WHY we actually are supposed to make device templates for specific NASes that don't behave properly.

-Thom

Thom - you can hardly expect me to create a new template for a NAS I don't own, for an issue I can neither reproduce nor that I understand the specifics of?!
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: tschak909 on July 15, 2009, 10:03:08 am
nope, not expecting _you_ to..

but this is literally how you solve these problems. It also allows for custom PnP configuration to take place (i.e. sending web page requests to automatically configure the device, etc.)

Look at the Buffalo and Maxtor NAS templates to get an idea.

-Thom
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: colinjones on July 15, 2009, 03:32:59 pm
Thom - hmm never thought of the sending/GETting web pages approach, that's interesting (more generally), was thinking more along the lines of pushing a share/server-specific config file change to the samba conf

... hmm not sure, that approach would be cooler, but perhaps changing the samba conf for specific shares would be lower impact... (to other devices also accessing the same share)


pigdog... can you detail more specifically what changes exactly you made to make it work?
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: pigdog on July 15, 2009, 04:45:32 pm
Hi colinjones,

The first thing I had to do was upgrade my DNS-323 to the latest firmware version of 1.07

With no username/password on the DNS-323 the default templates of Device template -File Server #1837 and Device template - Windows Share #1768 works fine - no changes.
              
                - device can be ping'd.

                Device template -File Server #1837
      This device controlled via - Core
      IP Address and MAC Address assigned.
      Registered: No
      Serial Number - ip address.
      Description - NAS

      Device template - Windows Share #1768
      This device controlled via - NAS
      Registered: No
      PK_Users - Use LinuxMCE's directory structure
      Share Name - Volume_#
      Filesystem - cifs
      Free Disk Space in MBytes - XXXXX
      Serial Number - MAC address\Volume_#
      Auto-assign to parents room - checked.
      Readonly - checked
      Online - checked

With a username/password on the DNS-323 the default templates of Device template -File Server #1837 and Device template - Windows Share #1768 (with username/password programmed plus password required -checked) the /etc/samba/smb.conf file needs 'client lanman auth = yes' added to the [global] section (needs service samba restart).

                Device template -File Server #1837
      This device controlled via - Core
      IP Address and MAC Address assigned.
      Registered: No
      Serial Number - ip address.
      Description - NAS

      Device template - Windows Share #1768
      This device controlled via - NAS
      Registered: No
      PK_Users - Use LinuxMCE's directory structure
      Share Name - Volume_#
      Filesystem - cifs
      Free Disk Space in MBytes - XXXXX
      Serial Number - MAC address\Volume_#
      Auto-assign to parents room - checked.
      Username/Password - programmed.
           Password Required - checked.
                Readonly - checked
      Online - checked

Without adding the change to smb.conf the device can be ping'd but never gets checked as online.

So, in a nutshell DNS-323 version 1.07 - no username/password - no changes.  With username/password, password required-checked - need change to smb.conf (needs service samba restart).

Cheers.
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: colinjones on July 15, 2009, 11:12:24 pm
I don't suppose anyone else reading this, with 0810 and using Windows shares on a Windows machine and/or another NAS, and/or using this NAS and the earlier firmware, could test adding this line to the config, rebooting and determining whether it effects their access to the shares? If there is no impact, then it may just be better to add this line of config more generally to 0810..
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: pigdog on July 15, 2009, 11:41:19 pm
Hi colinjones,

From reading the original bug report, to me, (but who am I anyway?), it sounds like they are more concerned with network security stuff.

Quote stuff...

In the end, the explanation for being unable to connect to servers using share-level security is very straightforward.

If I configure a samba server here for security=share and connect with smbclient, I see the following:

$ smbclient //borges/pub
Password:
Domain=[DNSG] OS=[Unix] Server=[Samba 3.0.30]
Server not using user level security and no password supplied.
Server requested LANMAN password (share-level security) but 'client use lanman
auth' is disabled
tree connect failed: SUCCESS - 0
$

The use of lanman authentication has been disabled on both client and server in Ubuntu 8.04 because it's substantially weaker that NTLM passwords, and therefore more vulnerable to decryption attacks of the network traffic.  To be precise, the man page for smb.conf says:

          This parameter determines whether  or  not  smbclient(8)  and  other samba  client  tools  will attempt to authenticate itself to servers using the weaker LANMAN password  hash.  
          If  disabled,  only  server which  support  NT  password  hashes  (e.g.  Windows NT/2000, Samba, etc... but not Windows 95/98) will be able to be connected from  the Samba client.

          The  LANMAN  encrypted  response is easily broken, due to it’s case-insensitive nature, and the choice  of  algorithm.  Clients  without Windows 95/98 servers are advised to disable this option.

          Disabling  this  option  will also disable the client plaintext auth option

I didn't remember that share-level security was restricted to lanman password authentication, but now that I see that, this failure to connect makes sense.  It is not accidental that the client refuses to
negotiate security in such a situation; I still believe this is the correct default for libsmbclient to use in hardy, because enabling weak authentication in the client doesn't just make it possible to use older
servers, it also makes it possible for a man-in-the-middle attacker to trick your client into using weak authentication when trying to talk to a newer server, compromising other passwords in the process.

As a workaround, users who need to access security=share servers can add 'client lanman auth = yes' to the [global] section of /etc/samba/smb.conf on their hardy client systems, to enable negotiation of this weak authentication protocol.

For nautilus/gvfs, there definitely should be a better feedback mechanism about this problem, so that users get some indication of why the connection has failed.

... unQuote stuff.

My NAS is inside my little network and not exposed to the outside world.  I would hate to assume (ass u me) but probably most everyone else's is too?

Those wanting to expose themselves outside have to know when to keep their overcoats buttoned.

Either that, or you get stuck with adding another check box to the template that say's "Authenticate Using LANMAN password".

How many options do you want to start sticking in templates?  Beats me!  From my experience I know it's a slippery slope.

How many options do you end up with to make something more flexible, or how many device specific templates do you create?

You guys know the answers and consequences better than I do.
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: colinjones on July 16, 2009, 03:47:37 am
pigdog - I would say that as LMCE is the smb client, enabling this option doesn't make the network any more or less secure, whether or not the NAS is exposed. It is the NAS itself that is the security issue, so whether LMCE allows this weaker security or not isn't going to reduce security, security is already reduced by the existance of the NAS which only allows this lesser security method.... its bowing to the lowest common denominator, but I think LMCE should enable this for maximum pnp-ability!
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: pigdog on July 16, 2009, 04:00:45 pm
Hi colinjones,

Just adding the 'client lanman auth = yes' string to smb.conf would avoid having to make any changes to templates.

Again, thanks for your help in sorting out the DNS NAS problem.
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: Zaerc on July 16, 2009, 06:25:50 pm
I don't think it would be wise to sacrifice security merely because some NAS vendor refuses to enter the 21th century.
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: pigdog on July 16, 2009, 08:39:15 pm
Hi,

I did find this site http://wiki.dns323.info/howto:bettersamba but I'm a little too intimidated to try it.
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: nite_man on July 16, 2009, 09:34:35 pm
Hi,

I did find this site http://wiki.dns323.info/howto:bettersamba but I'm a little too intimidated to try it.

I used that site when tuned my DNS-321. I setup SSH and transmission via fun_plug. The advantage of this approach is that the firmware of the NAS is not modified. To restore everything in the factory setting the fun_plug directory should be just removed.

I also faced with problem when NAS disappears time to time. So, I disabled its detection, added it to the fstab and made symlink in the videos, audio and pictures manually. I know this is dirty solution. But at least the media content from the NAS is available all time.
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: colinjones on July 16, 2009, 11:06:15 pm
I don't think it would be wise to sacrifice security merely because some NAS vendor refuses to enter the 21th century.

As I say, Zaerc, I don't see how this is sacrificing any security for LMCE. Its simply allowing LMCE to use a NAS that is already insecure. LMCE itself is no less secure, the only real exploit is for a man-in-the-middle attack, which would be exceedingly difficult to achieve on the "internal" network, particularly because you can't get "in the middle" on a switched, single segment LAN, effectively. Either way, it only appears to be this NAS so far, so I'm not really bothered, a wiki article would be just as good. Not sure how a new template, pnp'ing on the MAC address would work because the config change required seems to be global rather than share specific....
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: ccoudsi on July 17, 2009, 08:51:30 pm
Here’s my situation, I have 810 latest release, and DNS-323 with 1.05 FW, with password,  I was able to view & play all my media from the core orbitor and MDs without any problem, but I was not able to see any media from the webadmin, so reading this thread I upgraded my NAS to 1.07, and added this workaround.
Quote
As a workaround, users who need to access security=share servers can add 'client lanman auth = yes' to the [global] section of /etc/samba/smb.conf on their hardy client systems, to enable negotiation of this weak authentication protocol.

Now I don’t see anything any more not from orbitor nor from the webadmin here’s my log output

Code: [Select]
dcerouter_1000407:/usr/pluto/bin# sudo smbclient -U admin%linuxmce --list=//192.168.80.139
Domain=[MSHOME] OS=[Unix] Server=[Samba 3.0.24]

        Sharename       Type      Comment
        ---------       ----      -------
        BT              Disk
        web_page        Disk      Enter Our Web Page Setting
        lp              Printer   USB Printer
        Volume_1        Disk
        Multimedia      Disk
        IPC$            IPC       IPC Service (Dlink-DNS323)
Domain=[MSHOME] OS=[Unix] Server=[Samba 3.0.24]

        Server               Comment
        ---------            -------
        CC-SERVER            Charlie's server
        DNS-323              Dlink-DNS323

        Workgroup            Master
        ---------            -------
        LINUXMCE             DCEROUTER
        MSHOME               DNS-323
dcerouter_1000407:/usr/pluto/bin#


Code: [Select]
dcerouter_1000407:/usr/pluto/bin# sudo ping -qnc 1 -W 1 192.168.80.139 &>/dev/null
dcerouter_1000407:/usr/pluto/bin# echo "$?"
0
dcerouter_1000407:/usr/pluto/bin#

Code: [Select]
linuxmce@dcerouter:~$ smbclient //localhost/pub
Enter linuxmce's password:
session setup failed: NT_STATUS_LOGON_FAILURE
linuxmce@dcerouter:~$

Any Ideas???
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: pigdog on July 17, 2009, 09:08:37 pm
Hi Charlie,

I'm curious as to why the Server is CC-SERVER Comment Charlie's server and not Server DCEROUTER comment DCERouter.?

Did you change the server string/netbios name in /etc/samba/smb.conf?
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: ccoudsi on July 17, 2009, 09:13:10 pm
I have another PC server "CC-server" on the internal network, but it is not used by LinuxMCE
No I did not change
Quote
Did you change the server string/netbios name in /etc/samba/smb.conf?
What do I need to do??
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: pigdog on July 17, 2009, 09:25:49 pm
Hi Charlie,

So then ...

The DNS-323 has username/password and linuxmce as workgroup, plus volume_1 is read/write and assigned to user=username.  The dlink in the webadmin device tree has username/password that matches DNS-323 and password required checked.  On the Core/hybrid running 810, /etc/samba/smb.conf has client lanman auth = yes programmed in the global section (without quotes) and you restarted the samba service on the core/hybrid after making the changes?

After all that was done is online checked against the Dlink in the device tree view for the share volume?

P.S.  Are you using Linuxmce directory structure?
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: ccoudsi on July 17, 2009, 09:49:54 pm
Yes, correct I attached my screenshot, FYI.
Yes, I'm using LMCE directory structure

Here's the smb.conf changes
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
        client lanman auth = yes

[public]
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: ccoudsi on July 17, 2009, 10:02:40 pm
Here's  my other 2 screen shots.
BTW, I'm using a shared folder called Multimedia under Volume1, as read only !!
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: pigdog on July 17, 2009, 10:08:19 pm
Hi,

Prior to having a user defined on the DNS-323 shares Volume_1 and Volume_2 are marked using account "ALL" access.  

You delete the "ALL" volumes and re-add the volume(s) against the user account.

Your Share Name by default on the DNS-323 should be Volume_1.  

The only way I know that the Volume_1 or Volume_2 name can be changed from default on the DNS-323 is by installing fun_plug scripts and other hacks. on the DNS

Are you running a hacked DNS-323?
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: ccoudsi on July 17, 2009, 10:12:22 pm
No, I'm not running anything special, I was using this setup with 710, and 810 without a problem until I upgraded the firmware to 1.07 !!
The installation of the NAS was PnP.
The reason I upgraded to 1.07 so I can update my media images & tags from the web admin
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: ccoudsi on July 17, 2009, 10:20:49 pm
I didn't change any names I attached my NAS folder setup
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: pigdog on July 17, 2009, 10:27:25 pm
O.K

With the ALL in the DMS-323 settings you don't need passwords.

When you create a username/password you delete the ALL entries and re-add them using against the user account.

So in your instance you do not need changes to /etc/samba/smb.conf, or a username/password or password required checked in webadmin device tree.

You are using linuxmce directory structure so your media should be in that tree, not in a separate multimedia directory which would be more like a public directory.

Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: ccoudsi on July 17, 2009, 10:31:28 pm
Thanks Pigdog, I will remove the password and smb.conf modification & I will let you know the results
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: pigdog on July 17, 2009, 10:41:04 pm
Hi Charlie,

LinuxMCE directory tree on the DNS is as follows...

public
  - data
      - pictures
      - audio
      - documents
      - videos
      - games
      - pvr

Your multimedia stuff can be plugged into these folders and when you go through the main directory Media> Videos, for example, that's where your movies are.

Instead off deleting everything in samba, webadmin.  just deleted you ALL shares on the DNS and re-add them with the user account.
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: ccoudsi on July 18, 2009, 04:30:41 am
I just removed the password and the modification to smb.conf, now I'm able to see all my media on the orbiter, and I did resyncronize on the audio files, but still can not see the media on the web admin when I click show content, I attached more screen shot FYI.
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: colinjones on July 18, 2009, 05:41:36 am
Try clicking the Show files who (sic) are missing from disk tick box.... perhaps it thinks the share is offline...
Title: Re: Solution-Two options: How can I make NAS device stay Online?
Post by: ccoudsi on July 18, 2009, 05:57:22 am
Collin,

I was just trying to update my post, it looks like something change in 810, if I use Media browser I'm able to see my files, also if I use cover art I'm able to see my media, except for "Media Files Sync" where in the past (710) I was able to see all my files after synchronization!!
I did click on "show files are missing from disk" in audio folder nothing showed up even after I did resynchronizing my audio files, but I did see few files from pictures & videos.

Update:
Conclusion after resynchronizing all my media files I can not see any NAS shared files from the Web admin "Files & media\Media Files Sync" but I can see all my local drive media files ??? not sure why.