Come attivare la condivisione file Windows™ compatibile nel Mybook risuscitato.
(Questo articolo è solo in inglese. Se qualcuno è interessato me lo faccia sapere che lo traduco in italiano.)
How to add Windows™ compatible file sharing in the Revived Mybook.
Before installing Samba, it is suitable to install CUPS, too.
To install Samba and the web administration tool, SWAT, we use this command:
root@mybook:~# apt-get install swat
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
openbsd-inetd samba samba-common samba-doc tcpd update-inetd
Suggested packages:
samba-doc-pdf
Recommended packages:
smbldap-tools
The following NEW packages will be installed:
openbsd-inetd samba samba-common samba-doc swat tcpd update-inetd
0 upgraded, 7 newly installed, 0 to remove and 19 not upgraded.
Need to get 14.4MB of archives.
After unpacking 32.3MB of additional disk space will be used.
. . .
During the installation, installer ask for:
- Workgroup/Domain
- If you want to use WINS coming from DHCP
As the installation ends, you have Samba ready to work. If you haven’t SWAT running, use this command:
dpkg-reconfigure openbsd-inetd
that reads /etc/inetd.conf file and set inetd to automatically start at system boot.
Now you can start managing shares and users, pointing your browser to: http://ip-of-your-mybook:901/. You asked for login/password (that is root/root password).
Remember that Samba requires that Unix user must exist before you can add it to Samba users.
To create Unix user you can use:
# useradd -m username
that adds user “username” to Unix users and create (with -m switch) the home directory.
In this case you can assign users to private directories, and every user can manage his files, accessing with Samba password.
You can refer to immense documentation in the Samba website.
That’s all.


#1 da Jan Stastny il 9 January 2008 - 01:32
Hi Mario,
first, thanks for all your MyBook-related work, it awesome. I really enjoy having Debian at the device, instead of the half-working WD distro.
I’ve sucesfully installed Debian Lenny on my WD MyBook 500GB two days ago. Everything seems to run flawlessly, except for the most important thing — Samba…
I installed it by apt-get and there was no problem. Whenever I want to connect by client (command smbclient //192.168.1.120/data -U%), I get
Domain=[DOMA] OS=[Unix] Server=[Samba 3.0.28]
Receiving SMB: Server stopped responding
tree connect failed: Call timed out: server did not respond after 20000 milliseconds
The same thing happens both when running a self-compiled samba or stable version from Etch.
I tried running samba interactively with debugging information. The last lines it gives with -d3 before it dies are:
setting sec ctx (65534, 65534) – sec_ctx_stack_ndx = 0
smbd (192.168.1.120) connect to service IPC$ initially as user nobody (uid=65534, gid=65534) (pid 10372)
setting sec ctx (0, 0) – sec_ctx_stack_ndx = 0
tconX service=IPC$
Transaction 3 of length 114
switch message SMBtrans2 (pid 10372) conn 0x47fb78
setting sec ctx (65534, 65534) – sec_ctx_stack_ndx = 0
get_referred_path: |data| in dfs path \192.168.1.120\data is not a dfs root.
error packet at smbd/trans2.c(6260) cmd=50 (SMBtrans2) NT_STATUS_NOT_FOUND
timeout_processing: End of file from client (client has disconnected).
setting sec ctx (0, 0) – sec_ctx_stack_ndx = 0
setting sec ctx (0, 0) – sec_ctx_stack_ndx = 0
smbd (192.168.1.120) closed connection to service IPC$
Yielding connection to IPC$
setting sec ctx (0, 0) – sec_ctx_stack_ndx = 0
Yielding connection to
Server exit (normal exit)
Does Samba run ok at your MyBook?
Any help would be highly appreciated — I have absolutely no more ideas. The only solution I see now is to get back to WD distro, which I would be really sad about…
Regards,
Jan
#2 da Mario Pascucci il 9 January 2008 - 09:28
@Jan
What kind of security you use? User or password? Have you arranged user/shares for related access?
From your logs seem a problem of share configuration. Have you tested your smb.conf with “testparm” command?
#3 da Jan Stastny il 9 January 2008 - 11:45
Thanks for quick reaction.
I’ve tried almost everything concerning security. The thing is that not even the example configurations (simple anonymous one directory share) from samba.org don’t work.
Fresh apt-get purge samba-common samba && apt-get install samba doesn’t work either.
I’ve tried testparm and there have never been any problems.
I’ll probably do a fresh debian install as I can’t see any way from this situation.