LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 07-29-2007, 08:07 AM   #1
chakatz
LQ Newbie
 
Registered: Nov 2005
Distribution: Debian; kubuntu; RedHat; Mandriva; Gentoo
Posts: 12

Rep: Reputation: 0
How to mount or access WD My Book via network?


Hi,

I have a Western Digital My Book World Edition external storage drive. The version I have has a GB Ethernet network connection. I would like to access it from Linux but so far have had only limited success. I have been able to use SMB to access the Public directory but not any of the Private directories that I have created from the Windows Client. Also, I would like to be able to mount the drive with a faster transfer rate protocol, perhaps NFS. Any ideas, experience or links regarding MyBook Ethernet access?

Thanks

Chakatz
 
Old 07-29-2007, 08:23 AM   #2
camorri
Senior Member
 
Registered: Nov 2002
Location: Toronto Canada
Distribution: Slackware 14.0 + 14.1
Posts: 4,779

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
NFS is a client - server arrangement. Is the device a NFS server? If yes, you can install the client on liuux, export the shares, and mount them in a directory of choice.

It sounds like this device supports windoze file sharing. Samba client should be able to see anything a windoze machine can see.

For the private shares, I would assume this has a user and password to protect it? Does it send a request to the linux client for a user/password? Are you able to at least see the private share?

I had a look at Western Digitals site. It is running Vista.

One other thing I was wondering, WD doesn't mention the ehthernet connection. I saw USB and firewire400 and firewire800 connections. Are we talking about the same thing, or is this drive external to your windoze machine and connected through USB or firewire?

Last edited by camorri; 07-29-2007 at 08:41 AM.
 
Old 07-30-2007, 08:48 AM   #3
chakatz
LQ Newbie
 
Registered: Nov 2005
Distribution: Debian; kubuntu; RedHat; Mandriva; Gentoo
Posts: 12

Original Poster
Rep: Reputation: 0
Hi,

Thanks for the response. I have found out a bit more information about this device since I posted. I was able to hack into the device via ssh with the instructions from: http://martin.hinner.info/mybook/

Quote:
Originally Posted by camorri
NFS is a client - server arrangement. Is the device a NFS server? If yes, you can install the client on liuux, export the shares, and mount them in a directory of choice.
It has the /etc/exports file and the exportfs program. But it doesn't have a script for starting nfsd. I am going to have to wrestle with it for a while. I'd be glad to get some pointers on this.

Quote:
Originally Posted by camorri
It sounds like this device supports windoze file sharing. Samba client should be able to see anything a windoze machine can see.

For the private shares, I would assume this has a user and password to protect it? Does it send a request to the linux client for a user/password? Are you able to at least see the private share?
I was able to get the smb mount to work but I am not happy with the default user rights. It uses a default www-data (33) user and I want to be able to save as root or whatever. I want to do a large rsync -az to the device and the user rights are not changeable, yet. (working on that angle too)

Quote:
Originally Posted by camorri
I had a look at Western Digitals site. It is running Vista.
Not this device; it's running Linux for sure:
Quote:
uname -a
Linux MyBook 2.6.17.14 #1 PREEMPT Mon Mar 26 12:36:33 BST 2007 armv5tejl GNU/Linux
Quote:
Originally Posted by camorri
One other thing I was wondering, WD doesn't mention the ehthernet connection. I saw USB and firewire400 and firewire800 connections. Are we talking about the same thing, or is this drive external to your windoze machine and connected through USB or firewire?
It has GB Ethernet and USB built in.
Here is the product URL:
http://www.westerndigital.com/en/pro...78&language=en

This device is capable of being turned into a web server which is great because aside from serving as a backup and storage device, I have long been looking for a cheap, cool, quiet, web server device for maintaining a home based web site. I was looking for an old laptop but this is better.

Any Advice on the nfs or cifs (smb) issues I mentioned above?

Thanks again,
Chakatz

Last edited by chakatz; 07-30-2007 at 10:47 AM.
 
Old 07-30-2007, 10:53 AM   #4
chakatz
LQ Newbie
 
Registered: Nov 2005
Distribution: Debian; kubuntu; RedHat; Mandriva; Gentoo
Posts: 12

Original Poster
Rep: Reputation: 0
BTW, In keeping with the GPL, Western Digital has made the source code of the My Book World Edition available for download on their web site.

Go here: http://support.wdc.com/download/?cxml=n&pid=30&swid=64

Chakatz
 
Old 07-30-2007, 11:50 AM   #5
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,506

Rep: Reputation: 116Reputation: 116
Very nice... I'd love to get ahold of one of those on the cheap.
 
Old 07-31-2007, 08:10 AM   #6
camorri
Senior Member
 
Registered: Nov 2002
Location: Toronto Canada
Distribution: Slackware 14.0 + 14.1
Posts: 4,779

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
I stand corrected on the this WD product. It seems they make different models, and this on is linux based.

I saw a forum on WD's site. Have you looked there for help with NFS? Or how to install NFSfs etc.

I hope some one else can chime in with some help. This looks like a very good product to me, if there is some way through a package manager or compiling to add necessary code customizing use.
 
Old 08-01-2007, 10:28 AM   #7
chakatz
LQ Newbie
 
Registered: Nov 2005
Distribution: Debian; kubuntu; RedHat; Mandriva; Gentoo
Posts: 12

Original Poster
Rep: Reputation: 0
I'll take a look at the WD forums but they probably only speak MS there.

I haven't found a way to compile or add new packages... yet, but Martin Hinner has: http://martin.hinner.info/mybook/packages.php. I'll have to write and ask him how.

I was however able to get NFS working with a simple script that runs the needed dependencies in the proper order:

Quote:
modprobe nfsd
portmap
rpc.mountd
rpc.nfsd
rpc.statd
rpc.lockd
So now I have three ways to upload files to the device from Linux: scp, smb and nfs. But I still can't do rsync -az properly because it barfs about not having the authorization to do chown on the files. Is there a (cifs/smb mount or nfs mount) setting, or dir permission on the MyBook side, that will allow this? I have tried chmod 777 on the MyBook target dir and it still wouldn't allow chown. For now I just used tar to backup, no permissions issues this way.

Last edited by chakatz; 08-01-2007 at 10:33 AM.
 
Old 08-13-2007, 03:49 PM   #8
spikesnet
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Rep: Reputation: 0
Question, has anyone seen the source code for Martin Hinner's ssh hack? I know it's a php file you load when attempting to do a firmware upgrade and I emailed him asking for the source but got no rely.

I'm wondering if its possible he putting a backdoor in place or something like that.

Has anyone seen the source or attempted to see what the script is doing while it's running (other then creating ssh keys and enabling sshd)?

I'll have my mybook world in a few days but I'm not sure about this method of enabling sshd. It might be safer to mount one of the drives in another system and just enable sshd that way.
 
Old 08-17-2007, 08:03 AM   #9
spikesnet
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Rep: Reputation: 0
Quote:
Originally Posted by spikesnet View Post
Question, has anyone seen the source code for Martin Hinner's ssh hack? I know it's a php file you load when attempting to do a firmware upgrade and I emailed him asking for the source but got no rely.

I'm wondering if its possible he putting a backdoor in place or something like that.

Has anyone seen the source or attempted to see what the script is doing while it's running (other then creating ssh keys and enabling sshd)?

I'll have my mybook world in a few days but I'm not sure about this method of enabling sshd. It might be safer to mount one of the drives in another system and just enable sshd that way.

Ok, how about this, have any of you that have used his php script hack checked your systems over to make sure everything is ok?
 
Old 08-23-2007, 12:14 PM   #10
c123
LQ Newbie
 
Registered: Oct 2003
Distribution: knoppix
Posts: 2

Rep: Reputation: 0
Hello there,

1. has anyone looked at Martin's script or been able to get in contact with him?
2. any progress of using/install rsync? (is the my book world running a rsync daemon?)

I'm considering getting one of these things specifically to be able to use rsync to do backups (currently have a LaCie Ethernet Disk Mini V2 that works very well, but it has no rsync and is not easily hacked).

Cheers
 
Old 08-24-2007, 08:08 AM   #11
spikesnet
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Rep: Reputation: 0
Quote:
Originally Posted by c123 View Post
Hello there,

1. has anyone looked at Martin's script or been able to get in contact with him?
2. any progress of using/install rsync? (is the my book world running a rsync daemon?)

I'm considering getting one of these things specifically to be able to use rsync to do backups (currently have a LaCie Ethernet Disk Mini V2 that works very well, but it has no rsync and is not easily hacked).

Cheers
I've sent 2 emails to him asking for the source but got no reply.
 
Old 08-26-2007, 08:12 PM   #12
osgpcq
LQ Newbie
 
Registered: Aug 2007
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by spikesnet View Post
I've sent 2 emails to him asking for the source but got no reply.
Hi,
I play with tcpdump to have a look on the Martin's script, and all is ok. So i use it to modify My Book.
 
Old 08-27-2007, 03:16 AM   #13
c123
LQ Newbie
 
Registered: Oct 2003
Distribution: knoppix
Posts: 2

Rep: Reputation: 0
@spikesnet - thanks for the reply. guy *looks* legit, but zero replies to e-mails... and I can't quite understand why he does not want to publish the source for his hack...

@osgpcq - can you give us any more details as to what happens behind the scenes? I have still not decided whether a My Book is a good idea for me, and in any case I've never played around with tcpdump or ethereal etc (and am unlikely to find the time; even if I did not sure I'd understand anything).

Thanks guys.
 
Old 08-27-2007, 07:46 AM   #14
spikesnet
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Rep: Reputation: 0
I ran the hack on one of my mybooks and it looks like it created a directory called /var/upgrade which has the following files:

[root@MyBookWorld upgrade]# ls -la
total 28
drwxrwxrwx 2 root root 4096 Aug 22 23:24 .
drwxr-xr-x 18 root root 4096 Aug 25 23:29 ..
-rw-rw-rw- 1 root root 0 Aug 22 23:24 fwdownloaded
-rw-rw-rw- 1 root root 0 Aug 22 23:24 fwinstalled
-rw-rw-rw- 1 root root 73 Aug 22 23:23 fwv.tmp
-rwxrwxrwx 1 root root 1225 Aug 22 23:24 latestfw.sh
-rwxr-xr-x 1 root root 10 Aug 22 23:24 upgrade1.sh
-rw-rw-rw- 1 root root 51 Aug 22 23:24 xx

[root@MyBookWorld upgrade]# cat fwdownloaded

[root@MyBookWorld upgrade]# cat fwinstalled

[root@MyBookWorld upgrade]# cat fwv.tmp
<a href="http://martin.hinner.info/mybook/files/latestfw.sh">firmware</a>[root@MyBookWorld upgrade]

[root@MyBookWorld upgrade]# cat latestfw.sh
#!/bin/sh

echo '#!/bin/sh' >/var/upgrade/upgrade1.sh
chmod 755 /var/upgrade/upgrade1.sh
chmod 4755 /bin/busybox

KEYGEN=/usr/bin/ssh-keygen
SSHD=/usr/sbin/sshd
RSA1_KEY=/etc/ssh_host_key
RSA_KEY=/etc/ssh_host_rsa_key
DSA_KEY=/etc/ssh_host_dsa_key

do_rsa1_keygen() {
if [ ! -s $RSA1_KEY ]; then
echo -n $"Generating SSH1 RSA host key: "
if $KEYGEN -q -t rsa1 -f $RSA1_KEY -C '' -N '' >&/dev/null; then
chmod 600 $RSA1_KEY
chmod 644 $RSA1_KEY.pub
echo
else
echo
exit 1
fi
fi
}

do_rsa_keygen() {
if [ ! -s $RSA_KEY ]; then
echo -n $"Generating SSH2 RSA host key: "
if $KEYGEN -q -t rsa -f $RSA_KEY -C '' -N '' >&/dev/null; then
chmod 600 $RSA_KEY
chmod 644 $RSA_KEY.pub
echo
else
echo
exit 1
fi
fi
}

do_rsa1_keygen
do_rsa_keygen


/usr/bin/passwd -d root

/usr/sbin/sshd &

rm -f /tmp/active_upgrade

exit 0

[root@MyBookWorld upgrade]# cat upgrade1.sh
#!/bin/sh



It's possible its doing other things I didn't see too.
 
Old 08-28-2007, 11:41 AM   #15
bigcmos
LQ Newbie
 
Registered: Aug 2003
Location: San Luis Obispo
Distribution: debian 3.0
Posts: 4

Rep: Reputation: 0
Some Care Needed

This is a nice script which gets you up and running. The only issue I have is that it leaves your root password empty.

This is fine to let you get into your box, but I would recommend changing the root password when you get a chance to avoid letting anyone take over your box.


Quote:
/usr/bin/passwd -d root
Run this command as root to create a new password.
> /usr/bin/passwd
 
  


Reply

Tags
arm, busybox, nfs, rsync, samba, vpn, wd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the best book for learning Linux network programming silentray Linux - Networking 3 02-26-2007 10:20 AM
LXer: Test It Out: Early Access Book Programs LXer Syndicated Linux News 0 04-25-2006 11:54 PM
question about book: UNIX Network Programming Barq Linux - Networking 3 12-27-2005 01:36 PM
Would like to network book KDE pembo13 Linux - Networking 1 07-01-2004 12:37 PM
can't access ntfs mount through nfs mount bezoomny Linux - Networking 9 04-14-2004 10:25 AM


All times are GMT -5. The time now is 07:36 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration