PDA

Bekijk de volledige versie : Netatalk for Apple Shares?



haraldrt
03-03-2007, 19:14
I had the same problem, but reseting the router to its original settings (hold reset for more then 5 seconds) will bring it back alive, this will rewrite __pdc/passwd and set the router to password based share access.

Based on my experience, the problem lies in the heavily patched daemons asus uses especially samba.

I am happy to be free of that stupid smb based share system. I know use nfs/afp and cups.

afp gives a mac user a much better performance and more features.
using cups instead of that stupid printd makes it much more easy to share the printer on *x based systems. (I had to cheat a bit by adding the printer as parallel on /dev/usb/lp0)

This is the best system for mac users on the market. I have Apple shares, Bonjour announcement with avahi, CUPS (also used on Mac OS X), a new version of mt-daapd wich works great with itunes even with static/dynamic playlists and a VPN using openvpn on the router and tunnelblick on my mac/openvpn on my linux box

If you can try to use a (free) nfs client on windows
on XP you can even add a cups printer as network printer (try google)

with samba disabled there are no more problems with ubsa as others have also written here.

cu harald

Barron
10-03-2007, 21:15
Has anyone been able to get the Netatalk optware package going on the 700gE? I've been trying for a couple days and it's just not working out for me. I use Mac's at home and would love to have afp shares from the router!

BTW I'm using kfurge's custom firmware.

Thanks!! :)

Barron

clausbruun
11-03-2007, 12:02
Why dont you just use samba?

kfurge
12-03-2007, 00:20
Look here at haraldrt's posting:

http://wl500g.info/showthread.php?t=7749

- K.C.

Barron
12-03-2007, 01:09
Yeah I saw his post but it really didn't give any clues as to how to do it. Got it figured out now, just install the package "ipkg install netatalk" then have it start in your rc.local with:
---------
# Start my Apple Shares
/opt/sbin/afpd
---------
and configure your shares in the "/opt/etc/netatalk/AppleVolumes.default" file to look like:
---------
/shares/MYVOLUME1/MYSHARE1 "File Server"
/shares/MYVOLUME1/AnotherShare "Another Share"
/shares/MYVOLUME1/ProtectedShare "Private Share" password:tellno1
---------
Then from your mac use the "Connect to Server..." menu item from the Go menu and put in afp://192.168.1.1/ or whatever your ip is.

Done and done!

haraldrt
12-03-2007, 19:24
Sorry, I completly missed your post. By now you have already figured it out by yourself :D

Here are my (personal) tips for mac users:

If you would like to connect a printer to the wl700gE, my advice is to go with cups. this way you could easily add your printer using http://localhost:631 on your mac as it is published by cups.

Another good start is to use avahi to broadcast your afp-service on your local network using mdns (Bonjour).

replace the build-in mt-daapd with a new one using ipkg install mtdaapd
this leaves you with the possibilities of (dynamic) Playlists in iTunes. With the right config, static playlists are simple .m3u files. dynamic playlist are defined using regular expressions in mtdaapd.conf which is not changable in stock mtdaapd.

If you need comments/tips feel free to contact me

cu Harald

eitsch
26-07-2007, 15:34
due to many problems accessing my samba share on my wl700 with my macbook i found following solution, which could be useful to all macusers here in the board:



Ok, I've had the same problem, error -36.

This is where I found a solution, hope it helps others too.

http://docs.info.apple.com/article.html?artnum=301580

"Mac OS X 10.4: Error -36 alert displays when connecting to a Samba or Windows server
After upgrading from Mac OS X 10.3.x to Mac OS X 10.4, you may get an error message when you try to connect to a Samba or Windows (SMB/CIFS) server. A Samba or Windows (SMB/CIFS) server includes servers operating on Microsoft Windows and other operating systems that use Samba for SMB/CIFS services.

If the connection is unsuccessful, the following error message may appear:

The Finder cannot complete the operation because some of the data in smb://........ could not be read or written. (Error code -36).
If you check the Console (/Applications/Utilities/), you will also see this error message:

mount_smbfs: session setup phase failed
This error can occur if your Mac OS X 10.4 client is trying to connect to a Samba or Windows (SMB/CIFS) server that only supports plain text passwords. If you do not see the above message in the Console, you are not experiencing this issue and should try normal troubleshooting to isolate the source of the issue.

Unlike Mac OS X 10.3, the Mac OS X 10.4 SMB/CIFS client by default only supports encrypted passwords. Most modern Samba or Windows (SMB/CIFS) servers use encrypted passwords by default, while some Samba servers might have to be reconfigured.

You should consider contacting the owner or system administrator of the Samba or Windows (SMB/CIFS) server to which you are trying to connect and encourage them to disable plain text passwords and start using encrypted ones. If the server cannot be reconfigured to support encrypted passwords, you can configure Mac OS X 10.4 SMB/CIFS client to send plain text passwords.

Warning: If you configure your computer to allow connections to Samba or Windows (SMB/CIFS) servers using plain text passwords, when you attempt to make any connection to such a Samba or Windows (SMB/CIFS) server, your password will be sent "in the clear". This means that it is possible for someone who is monitoring your connection to see your password. This could lead to someone compromising the Samba or Windows (SMB/CIFS) server. We strongly recommend that you configure your Samba or Windows (SMB/CIFS) servers to exclusively use encrypted passwords.

Follow the steps below to configure your computer to use plain text passwords to make SMB/CIFS connections when the specified Samba or Windows (SMB/CIFS) server does not support encrypted passwords. (You must be an administrator to do these steps.)

Make sure that you are not currently connected to any Samba or Windows (SMB/CIFS) servers and that you do not have any Samba or Windows-related error messages open.
Open the Terminal (/Applications/Utilities/).
At the prompt, type: sudo pico /etc/nsmb.conf
Press Return.
Enter your password when prompted, then press Return again.
You should see an empty file and a "New File" notice at the bottom of the pico window. If you do not see the "New File" notice, this file already exists.
Enter the following into the file so that it appears as follows:

[default]
minauth=none


Save the file (press Control-O), press Return, then exit pico (Control-X).
Type: sudo chmod a+r /etc/nsmb.conf
Press Return.
Restart your computer."

Cheers.


hope this helps someone

regards

haraldrt
31-07-2007, 18:02
Why don't you use nfs ?
It's more native and faster between two unix systems ( I count OS X as a *nix ), the linux kernel supports it directly and OS X has no Problems using nfs either.

Another Solution is using kfurge's firmware and installing netatalk to get afp shares

cu
Harald

snarfer
24-08-2007, 09:37
I managed to install ipkg netatalk. seems to be working okay, although i haven't found a proper startup script.

next i want to setup avahi to broadcast the share on my local network. but when i try to start the avahi-daemon i get the message:


/opt/sbin/avahi-daemon: can't load library 'libssp.so.0'


there doesn't appear to be any such ipkg available. any ideas?

avberk
24-08-2007, 10:39
Avahi depends on:

expat, libdaemon, dbus


Try following:
-ipkg update
-ipkg expat
-ipkg liddaemon
-ipkg dbus

Then try again.

If it doesn't work you might have to create a symbolic link
with 'ln' somehow...

snarfer
24-08-2007, 11:22
i guess i will have to make the symbolic link then.

not sure where to find the file (s) that need to be linked and where the link should go though.


Package expat (2.0.1-1) installed in /opt/ is up to date.
Nothing to be done
Successfully terminated.

Package dbus (1.1.1-1) installed in /opt/ is up to date.
Nothing to be done
Successfully terminated.

Package libdaemon (0.11-1) installed in /opt/ is up to date.
Nothing to be done
Successfully terminated.

snarfer
25-08-2007, 08:55
After much googling I came across this thread:

http://wl500g.info/archive/index.php/t-10048.html

When I get it done I will be sure to write it up for the benefit of other apple users.

realfolkblues
26-10-2007, 09:43
can someone help me set up netatalk on my router? I've tryed but i cant seem to get past teh password feild. I need it to backup my mac with time-machine.

szlaeyer
19-02-2008, 19:22
Hello.

I use my WL-500G Premium (firmware 1.9.7.5) with a Western Digital MyBook 320 Gb.
I'd like to back-up on it with Time Machine, but the system cannot write on it, as neither can I. To make the external drive visible to Leopard I used defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1 in Terminal. The drive shows up alright in Finder, but when I try to copy any file to it the system tells me that I don't have enough permissions.
With iBackup it works as long as I use the "Backup to Windows" option, but still I'd like to use Time Machine.
I don't have any experience with UNIX commands and I'm quite a noob with advance networking settings, but I do hope there is somebody who can help me with this, 'cause I feel I'm missing something very obvious here...

Thank you.

wpte
24-02-2008, 20:00
Original firmware or olegs?
if you are using oleg, you might need to install a different samba, or just allow writing...
I have no experience on a MAC tough.. I gave up as soon as it crashed on unzipping:o
I guess you are using a program compatible with the shared folders of windows?

matmota
26-02-2008, 19:34
Apparently you (the original poster) are trying to use it through Samba, which I haven't got working.

However I wanted to use some more direct mechanism that wasn't limited by Windows conventions, and got some connection with FTP from the Finder: Command-K and use "ftp://192.168.1.1/" will mount the drive. The problem is that in my case it disconnects after a while.
I also tried NFS, and got it working only unreliably, with disconnections after a while like with FTP. Apart from that, you have to mount it from the shell with a rather ugly command.

Just now I got AFP working through netatalk, which is why I'm writing this reply.
The problem I had was that it did not accept my login.
In the log files I've seen that Netatalk (afpd) was refusing to let the root user to login, so I created a new user, set the password, and with those it works.
I'm using Oleg's firmware, version 1.9.2.7-8 (the current one as I write this), and installed the package netatalk.

I'm afraid this is not easy to do, so perhaps it's not what you want, but if it works I think it's the best way to connect from MacOS X.

What I did was to set things up as specified in this thread:
http://wl500g.info/showthread.php?t=10307
Once you can install things in /opt (your USB hard disk) with ipkg, you can install netatalk.
There is more information about this here:
http://wl500g.info/showthread.php?t=8558&highlight=netatalk
http://netatalk.sourceforge.net/2.0/htmldocs/AppleVolumes.default.5.html

I removed avahi as it did not work anyway and it caused some conflicts because it needs the library libssp.so.0, which AFAIK can only be installed with the package buildroot that conflicts with other packages I wanted.
I guess that it would work after solving the main issue as explained below.

Apparently Netatalk only supports plain text passwords, and Leopard requires encrypted passwords:
http://www.blackmac.de/archives/58-Make-Netatalk-talk-to-Leopard-Mac-OS-X-10.5.html

As noted there, the way to make Leopard accept plain text passwords is:

defaults write com.apple.AppleShareClient afp_cleartext_allow -bool true
I would really prefer if this was not necessary. You might want to try first without it, and if it works please tell us here.
I just tried to set it back to disallow plain text passwords with:

defaults write com.apple.AppleShareClient afp_cleartext_allow -bool false
and it seems to work fine. So if you try to follow this, please try first without setting this property and tell me if it worked.

The final thing I had to do was to create the new user that could log in through AFP.
For that I installed the package adduser, but since /home is read-only anyway, it could be enough to add a line to /etc/passwd like:

normaluser:x:1000:1000:Linux User,,,:/home/normaluser:/bin/sh
and then set the password with "passwd normaluser" from root. The user name "normaluser" is of course arbitrary: you can use other name and it would work the same.

If you want the volume to mount a specific directory of your hard disk instead of the home directory of the user (which I think would not work at all as the directory does not exist), replace the last line (the tilde) of the file /opt/etc/netatalk/AppleVolumes.default with:

#~
/tmp/harddisk "Disco"

You can put any volume name you want instead of "Disco".

Now, I can mount my USB disk at /tmp/harddisk by hitting Command-K in the Finder, using "afp://192.168.1.1/" as the server address, and logging in as "normaluser".

ENDer2000
04-05-2008, 11:47
I cannot create Samba users on my CDMA supported firmware.
On WIndows it does not ask for authentification, but under MacOSX leopard, I need user & password :(

How can I create user & password ?

tlustoch
05-06-2008, 12:56
I want to run a rendezvous/bonjour proxy (http://developer.apple.com/opensource/internet/bonjour.html) on wl-500gp so I can connect from my home itunes to the itunes share running in my office (something like this (http://wiki.mt-daapd.org/wiki/SSH_Tunnel) but on asus wl-500gp instead on PC or Mac).

Do anyone know about the mDNSProxy/rendezvous/bonjour package for ASUS wl-500gp with olegs firmware?

Updated Jun 2008
I found the package avahi (http://avahi.org/). But it does not work with my Asus. You can try to install it
but I end up with the error message

ipkg avahi
/opt/sbin/avahi-daemon: can't load library 'libssp.so.0'
I found this solution (http://wl500g.info/showthread.php?t=10408&highlight=http) but avahi is still failing. I installed buildroot, created missing user avahi and finally obtained following error:

avahi-daemon
Found user 'avahi' (UID 1002) and group 'avahi' (GID 1002).
Successfully dropped root privileges.
avahi-daemon 0.6.22 starting up.
WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
dbus_bus_get_private(): Failed to connect to socket /opt/var/run/dbus/system_bus_socket: Connection refused
WARNING: Failed to contact D-Bus daemon.
[admin@my root]$ avahi-daemon --debug -D
Timeout reached while wating for return value
Could not receive return value from daemon process.

But my ipkg does not know nss-mdns: I found it by http://ipkgfind.nslu2-linux.org/ (http://ipkgfind.nslu2-linux.org/details.phtml?package=libnss-mdns&official=&format=) but not in the oleg's optware section.

Rui_Carlos
27-07-2008, 13:19
I've installed the package netatalk, which provide the binary afpd. But when I try to run this binary, I get the message -sh: afpd: not found. Even if I use the full path, I get the same message. This happens with almost all binaries provided by this package.

Anybody knows what is the problem and/or hot to solve it?

Thanks.

Rui_Carlos
25-08-2008, 17:35
Apparently you (the original poster) are trying to use it through Samba, which I haven't got working.

You can try this: http://hupio.wordpress.com/2008/04/27/osx-timemachine-and-sambawindows-share/
I'm using Samba, and it works!

PS: I've tried AFP, but I couldn't put Netatalk working :\

Kenny
26-08-2008, 22:55
just follow this post http://wl500g.info/showpost.php?p=15955&postcount=5
working for me (read/write allowed on EXT3) I have the same HD

Olsson
11-11-2008, 23:20
I'm running out of ideas here, so I have to ask, even though it may has been already discussed before (I extensively searched the forum, but sorry, couldnt find anything).

I have installed oleg's firmware and followed pretty much wengi's tutorial to get everything beautifully running on my asus router, incl transmission and netatalk (for TimeMachine backups). So far, so good.

However, all https sites, are incredibly slow or even timeout, but on the other hand, I do not have any problems whatsoever with any other site. (This is particular annoying for gmail, etc.)

First I thought about a port problem, but I can't figure out (or prob I don't understand it at all) any reason why particularly secure sites are not working? https uses 443, right? Any collisions possible with transmissiond? Though I'm using transmissiond -p 65534... etc.
So can this be related? Or am I just stupid?

Any help, any ideas? I'm willing to give any further information on my settings, if needed.

I would really appreciate any feedback, I'm getting nuts here :confused: Thanks a lot!

Olsson
27-11-2008, 03:01
Thanks for your reply. But I dont think anything is wrong with the settings of my browser, since this problem occurs on various different computers and browsers (and with the same settings, in another network, everything is fine).

Somehow, I believe, I tracked it down to the transmission client being the cause of this. If transmission is 'paused' or stopped, speed is up to normal.

That maybe helps to access https sites, but I still don't understand it. It simply makes NO SENSE !!!

I could understand, if the whole network would slow down, due to heavy CPU consumption on the router (which is NOT the case) or something like that. But why only https sites?
... like I said: I'm getting crazy!

MMCM
27-11-2008, 13:06
Does transmission-daemon consume all available bandwidth? Does it help to reduce the maximum upload/download rate of transmission?
Did you try do use a different port for transmission?
Maybe you should take a look at the wan traffice with tcpdump, with transmission running and stopped.

DrChair
27-11-2008, 22:51
Try lowering the MTU on your pc from 1500 to 1400.
I had the same issue (https timing out) a while ago, and in my case there were a few bad routers between me and the rest of the world.
These routers dropped anything bigger than 1400.

(you can check it with mturoute.exe -t)

DVB
03-02-2009, 19:38
i have the same problem and i fixed this morning starting service "dbus" :


root@OpenWrt:~# /opt/etc/init.d/S20dbus start

avahi-daemon

root@OpenWrt:~# avahi-daemon
Found user 'avahi' (UID 1000) and group 'avahi' (GID 1000).
Successfully dropped root privileges.
avahi-daemon 0.6.24 starting up.
WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
Loading service file /opt/etc/avahi/services/daapd.service.
Loading service file /opt/etc/avahi/services/sftp-ssh.service.
Loading service file /opt/etc/avahi/services/ssh.service.
Joining mDNS multicast group on interface br-lan.IPv4 with address 192.168.1.200.
New relevant interface br-lan.IPv4 for mDNS.
Network interface enumeration completed.
Registering new address record for 192.168.1.200 on br-lan.IPv4.
Registering HINFO record with values 'MIPS'/'LINUX'.
Server startup complete. Host name is OpenWrt.local. Local service cookie is 4021731059.
Service "OpenWrt" (/opt/etc/avahi/services/ssh.service) successfully established.
Service "SFTP File Transfer on OpenWrt" (/opt/etc/avahi/services/sftp-ssh.service) successfully established.
Service "OpenWrt" (/opt/etc/avahi/services/daapd.service) successfully established.


and then i start my daapd server :p


root@OpenWrt:~# mt-daapd -c /etc/mt-daapd.conf


sorry for my english, im spanish :)

ben905
10-02-2009, 16:12
For those who want to start avahi when the device start I have wrote this little startup script.

Create startup script by typing:


nano -w /opt/etc/init.d/S90avahi-daemon


and paste this:


#!/bin/sh
#
# Startup script for avahi-daemon

case $1 in
start)
/opt/sbin/avahi-daemon -D
;;

stop)
/opt/sbin/avahi-daemon -k
;;

restart)
$0 stop
$0 start
;;

*)
echo "Usage: $0 (start|stop|restart)"
exit 1
esac


Save the file by closing nano.
Make it executable and start it:


chmod 755 /opt/etc/init.d/S90avahi-daemon
/opt/etc/init.d/S90avahi-daemon start


Avahi is now running, you can check the process with:


ps ax | grep avah[i]


If you have follow the part 5 of this How to (http://wl500g.info/showthread.php?t=10307), the post-mount script will automaticaly call this script at start.

blaeberries
08-03-2009, 15:30
Rather than have Your Mac send unencrypted passswords, edit your samba config to allow encrypted passwords.

$ nano /etc/smb.conf
$ cat /etc/smb.conf
[global]
interfaces = br0
bind interfaces only = yes
workgroup = Workgroup
server string = WLHDD
guest account = nobody
security = share
browseable = yes
guest ok = yes
guest only = yes
log level = 1
max log size = 100
encrypt passwords = yes
preserve case = yes
short preserve case = yes

[share]
path = /opt/share/share
writable = yes
force user = admin

$ flashfs save && flashfs commit && flashfs enable

pooz
03-11-2009, 20:54
@Harald,

may you show, how to install/configure AFP for usage with mac?

I am using SMB/CIFS, and had no problem until now. It is only slow :-)

Thanks

pooz
06-11-2009, 00:25
just install the package "ipkg install netatalk"

I tried this, but got this error:

[Du@PooWL700gE /]$ sudo ipkg install netatalk
Installing netatalk (2.0.3-5) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/netatalk_2.0.3-5_mipsel.ipk
Installing libdb (4.2.52-3) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/libdb_4.2.52-3_mipsel.ipk
Configuring libdb
Configuring netatalk
Configuring vsftpd
You'll need to add line like
echo "ftp stream tcp nowait root /opt/sbin/vsftpd /opt/etc/vsftpd.conf" >>/etc/inetd.conf
to your /unslung/rc.xinetd file -- see the wiki at http://www.nslu2-linux.org for more info
postinst script returned status 1
ERROR: vsftpd.postinst returned 1
Successfully terminated.

May s.o. pleeeaase help me :-)
THANK U!

EDIT: Got it working, but how to delete this posting?

ridic
31-12-2009, 15:40
How can I edit the Samba config file in System Command?
I can only view it using cat /etc/smb.conf but I'm not able to edit it.
Please help me someone.
Thanks

luke1984
23-01-2010, 19:07
Rather than have Your Mac send unencrypted passswords, edit your samba config to allow encrypted passwords.

$ nano /etc/smb.conf
$ cat /etc/smb.conf
[global]
interfaces = br0
bind interfaces only = yes
workgroup = Workgroup
server string = WLHDD
guest account = nobody
security = share
browseable = yes
guest ok = yes
guest only = yes
log level = 1
max log size = 100
encrypt passwords = yes
preserve case = yes
short preserve case = yes

[share]
path = /opt/share/share
writable = yes
force user = admin

$ flashfs save && flashfs commit && flashfs enable

i do it as you suggest in your post and it works great but after reboot it still goes to encrypt passwords = no and i have to edit the file every time. it seems that this saving to router flash doesn't work!! somebody suggested to add a line to /use/local/.files pointing to /etc/smb.conf and it dosn't work as well after restart.

what am i doing wrong?

aciddrinker
28-02-2011, 21:14
What would be steps before this solution (described below) on fresh install of Olegs firmware (1.9.2.7-d-r2624) ?

1. I understand that I would attach usb flash or usb hdd formated in ext3? How big should this drive/partition be ?
2. As what share shall I mount it? /opt ? Is /opt the full track I should use for ounting?
3. What packages should I install prior to avahi ? Eg. ipkg ? On my system I can find only ipkg.sh - is it ok?
4. At what stage i do flash commit?

luke1984
06-08-2011, 10:01
Hello,

In new OSX Lion they have changed samba service and the one configured acording to wengi's tutorial no longer works. The native solution for OSX sharing is netatalk. I have installed it with ipkg but I have no clue how to configure it to make it work and start automatically after restart? Some users suggest to add something like a bonjour deamon call avahi, which after install does't start (it says there is no user).

So my question is:
1) is it possible to configure samba to work with OSX Lion (on the router side)
2) if not, anybody managed to set afp (netatalk) file sharing for OSX