![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.
Ubuntu 9.10 is out!!!
When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu. The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely. |
|
Networking & Wireless Having problems getting connected to the internet or getting your wireless card to work? Ask here. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
First Cup of Ubuntu
![]() Join Date: Apr 2006
My beans are hidden!
|
Sharing and Advertising Ubuntu with Avahi and Netatalk
This might already exist somewhere, or in numerous pieces on the forum, but I thought I would write up a brief explanation of how to get your Ubuntu box sharing home folders with your Mac OS X box. I decided to use the native networking protocol AFP (over tcp) and advertise using zeroconf so I had a more seamless networking environment. I use Ubuntu as a simple server and would like to access my home directory from time to time. While I did find all of the pieces to do this between here, other forums, and a wiki, I thought it would be nice to have a simple all in one post that covered it all. Pardon me if there is already something like it. My installation of Ubuntu is Edgy running 2.6.17-10-powerpc (running on a mac mini). I would assume that you could do the very same on the x86 version as well. If someone reads this and has luck with it, please let me know.
First things first, in order to get AFP working, you'll need to install netatalk. Now, the problem here is that netatalk as stored in the repositories does not have the proper plugin to facilitate encrypted passwords, so on the Mac side of things it will nag you about sending passwords in the clear. We'll get by that pretty easily though by building the package ourselves. Also, you need to make sure that you have the universe repositories available for the distribution. Hop into the command line and from your home directory enter these commands: Code:
sudo apt-get build-dep netatalk sudo apt-get install cracklib2-dev fakeroot libssl-dev sudo apt-get source netatalk cd netatalk-2.0.3/ sudo DEB_BUILD_OPTIONS=ssl dpkg-buildpackage -rfakeroot sudo dpkg -i ~/netatalk_2.0.3-4_i386.deb Code:
echo "netatalk hold" | sudo dpkg --set-selections Code:
nano /etc/netatalk/afpd.conf Code:
- -noddp -uamlist uams_randnum.so,uams_dhx.so Code:
nano /etc/netatalk/AppleVolumes.default Code:
~ Code:
sudo /etc/init.d/netatalk restart Code:
sudo apt-get install avahi-daemon Code:
sudo apt-get install libnss-mdns Code:
sudo nano /etc/nsswitch.conf Code:
hosts:files dns mdns Code:
sudo nano /etc/avahi/services/afpd.service Code:
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
</service-group>
Code:
sudo /etc/init.d/avahi-daemon restart Code:
sudo nano /etc/default/avahi-daemon Code:
AVAHI_DAEMON_START=0 to AVAHI_DAEMON_START=1 Ubuntu Wiki on Zeroconf Hope this helps out someone! I apologize for my ridiculous use of the code tag. Last edited by childofdust; March 13th, 2007 at 11:39 AM.. |
|
|
|
|
|
#2 |
|
5 Cups of Ubuntu
![]() Join Date: Feb 2007
Beans: 33
|
hello:
LIne 6 in the first code window should be: Code:
DEB_BUILD_OPTIONS=ssl sudo dpkg-buildpackage -rfakeroot Thanks for posting this though, it is a life save! Cheers, MaXqUE |
|
|
|
|
|
#3 |
|
5 Cups of Ubuntu
![]() Join Date: Feb 2007
Beans: 33
|
Re: Sharing and Advertising Ubuntu with Avahi and Netatalk
Hello:
There seems to be a problem with the gpg keys for this code. This is the last lines of the netatlk compile .. looks like it failed trying to confirm the signature: Code:
dh_strip -pnetatalk
dh_compress -pnetatalk
dh_fixperms -pnetatalk
dh_makeshlibs -pnetatalk
dh_installdeb -pnetatalk
dh_perl -pnetatalk
dh_shlibdeps -pnetatalk
dh_gencontrol -pnetatalk -- -Vssl:Recommends=", cracklib-runtime, libpam-cracklib"
dpkg-gencontrol: warning: unknown substitution variable ${misc:Depends}
dh_md5sums -pnetatalk
dh_builddeb -pnetatalk
dpkg-deb: building package `netatalk' in `../netatalk_2.0.3-4_i386.deb'.
tar: -: file name read contains nul character
signfile netatalk_2.0.3-4.dsc
gpg: keyring `/home/katatak/.gnupg/secring.gpg' created
gpg: skipped "Sebastian Rittau <srittau@debian.org>": secret key not available
gpg: [stdin]: clearsign failed: secret key not available
dpkg-genchanges
dpkg-genchanges: not including original source code in upload
dpkg-buildpackage: binary and diff upload (original source NOT included)
(WARNING: Failed to sign .dsc and .changes file)
Cheers, MaXqUE |
|
|
|
|
|
#4 |
|
First Cup of Ubuntu
![]() |
Re: Sharing and Advertising Ubuntu with Avahi and Netatalk
Thank You!
Just a quick update. To publish the afpd service your path and file name were incorrect. It should be: Code:
sudo nano /etc/avahi/services/afpd.service Last edited by rbarrimond; March 6th, 2007 at 11:31 PM.. Reason: Updating typo for afpd Bonjour publishing |
|
|
|
|
|
#5 |
|
First Cup of Ubuntu
![]() Join Date: Jul 2007
Location: California
Beans: 3
Hardy Heron (Ubuntu Development)
|
Hi kids...
I am successfully running Netatalk (on Ubuntu 8.04 Hardy Heron) with MacOSX 10.5 Leopard I had some problems setting it up (Netatalk, avahi-daemon, and mdns). I have finally figured out all that needs to be done, and I thought I'd share it with you guys in the hopes of saving someone else the work of figuring out. I should say that I am not even sure if other people have the same difficulties I had, but for what it's worth: It is my understandning that Netatalk 2.0.3-7 (in the Hardy repos) are non-functional. There is a fix .diff you could apply, though I chose to run th the newer (though experimental) version: 2.0.3-8. These following steps are very similar to the original posters, this is not verbose, and it doesnt have to be. copy - paste... Code:
mkdir -p ~/src/netatalk cd ~/src/netatalk sudo aptitude install devscripts cracklib2-dev dpkg-dev libssl-dev build-essential sudo apt-get build-dep netatalk wget http://ftp.de.debian.org/debian/pool/main/n/netatalk/netatalk_2.0.3.orig.tar.gz wget http://ftp.de.debian.org/debian/pool/main/n/netatalk/netatalk_2.0.3-8.diff.gz wget http://ftp.de.debian.org/debian/pool/main/n/netatalk/netatalk_2.0.3-8.dsc dpkg-source -x ./netatalk_2.0.3-8.dsc cd netatalk-2.0.3 sudo su DEB_BUILD_OPTIONS=ssl dpkg-buildpackage -us -uc debi exit echo "netatalk hold" | sudo dpkg --set-selections echo userpassword > ~/.passwd chmod 600 ~/.passwd now you have to tweak / att a few files: fix /ets/netatalk/afpd.conf Code:
sudo vim /etc/netatalk/afpd.conf Code:
- -transall -uamlist uams_randnum.so,uams_dhx.so -nosavepassword Code:
sudo vim /etc/default/netatalk Code:
ATALKD_RUN=yes PAPD_RUN=yes CNID_METAD_RUN=no AFPD_RUN=yes TIMELORD_RUN=no A2BOOT_RUN=no Code:
ATALKD_RUN=no PAPD_RUN=no CNID_METAD_RUN=no AFPD_RUN=yes TIMELORD_RUN=no A2BOOT_RUN=no Code:
sudo /etc/init.d/netatalk restart Code:
sudo apt-get install --reinstall avahi-daemon; sudo dpkg-reconfigure avahi-daemon sudo apt-get install --reinstall libnss-mdns; sudo dpkg-reconfigure libnss-mdns Code:
sudo vim /etc/nsswitch.conf Code:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 mdns Code:
sudo vim /etc/avahi/services/afpd.service Code:
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
</service-group>
Code:
vino-preferences Under General: Code:
Check: "Allow other users to view your desktop" Check: "Allow other users to control your desktop" Uncheck: "Ask for your confirmation" Check: "Require the user to enter this password" --> Preferably the same password as your users login-password. Code:
Uncheck: "Only local connections" Check: "Use an alternate port:" Enter 5901 Uncheck: "Require Encryption" (I havent gotten this to work with Leopard) Uncheck: "Lock screen on disconnect" Choose: Only Display an icon when there is someone connected Add the avahi service file: Code:
sudo vim /etc/avahi/services/rfb.service Code:
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_rfb._tcp</type>
<port>5901</port>
</service>
</service-group>
Code:
sudo nano /etc/default/avahi-daemon Code:
AVAHI_DAEMON_START=1 Code:
sudo /etc/init.d/avahi-daemon restart Here is how: edit /etc/avahi/avahi-daemon.conf: Code:
sudo vim /etc/avahi/avahi-daemon.conf Code:
#enable-dbus=yes Code:
enable-dbus=no That is about it. Now just restart both Netatalk and avahi-daemon to make sure that they read in all the new config files: Code:
sudo /etc/init.d/netatalk restart; sudo /etc/init.d/avahi-daemon restart Hope this helped someone. Here are some screen shots to show yout what I mean by the "IP address" showing up. cheers .n |
|
|
|
|
|
#6 |
|
Extra Foam Sugar Free Ubuntu
![]() Join Date: Jan 2008
Location: San Juan Islands, WA
Beans: 772
Ubuntu 8.10 Intrepid Ibex
|
Re: Sharing and Advertising Ubuntu with Avahi and Netatalk
For those looking to share via NFS instead of AFP, but still want that zeroconf automagic goodness, have a look at this post over here.
Cheers, Eiríkr |
|
|
|
|
|
#7 |
|
First Cup of Ubuntu
![]() Join Date: Oct 2004
Location: Australia
My beans are hidden!
Hardy Heron (Ubuntu Development)
|
Re: Sharing and Advertising Ubuntu with Avahi and Netatalk
I encountered the same problem as helbro when setting up a Netatalk server with Hardy on my LAN last night. The Finder on my Macs would show a share entry for both the server name and the server IP address. I figured out the problem was that Netatalk has been patched to automatically register itself with Avahi, resulting in the automatic entry as well at the manual entry entered into /etc/avahi/services.
For some reason the automatic Avahi entry uses the IP address label instead of the hostname. Since the manual entry works better, I just had to add Code:
-nozeroconf I also couldn't be bothered compiling a new version of Netatalk with encryption built in since I'm only using AFP on my home LAN, so I just installed the latest Debian 2.0.3-8 package instead which seems to work fine on Hardy and fixes the bug in the current package that helbro mentioned. I did discover though that Leopard now disables unencrypted AFP connections by default. I fixed this with the help of http://www.macosxhints.com/article.p...71028025409750 by entering Code:
$ defaults write com.apple.AppleShareClient "afp_cleartext_allow" -bool YES $ defaults write com.apple.AppleShareClient "afp_cleartext_warn" -bool YES |
|
|
|
|
|
#8 |
|
First Cup of Ubuntu
![]() Join Date: Apr 2008
Beans: 1
|
Re: Sharing and Advertising Ubuntu with Avahi and Netatalk
Hi!
[quote=childofdust;2067696] Code:
sudo DEB_BUILD_OPTIONS=ssl dpkg-buildpackage -rfakeroot Code:
~/netatalk-2.0.3$ sudo DEB_BUILD_OPTIONS=ssl dpkg-buildpackage -rfakeroot sudo: DEB_BUILD_OPTIONS=ssl: command not found Nevermind, solved it! Last edited by supermac; April 6th, 2008 at 07:14 AM.. |
|
|
|
|
|
#9 | |
|
First Cup of Ubuntu
![]() Join Date: Jul 2007
Location: California
Beans: 3
Hardy Heron (Ubuntu Development)
|
Re: Sharing and Advertising Ubuntu with Avahi and Netatalk
Quote:
If someone doesn't have a way to remove this without disabling dbus, Im left with no choice.. what does dbus do anyway? I haven't really noticed any lack of functionality without it... sincerely, Niclas |
|
|
|
|
|
|
#10 |
|
5 Cups of Ubuntu
![]() Join Date: Feb 2008
Beans: 20
|
Re: Sharing and Advertising Ubuntu with Avahi and Netatalk
Disabling dbus stops services from registering themselves with Avahi. Services like CUPS, which I'm using to share my printers.
As such, disabling dbus is not an option for me, however adding -nozeroconf to afpd.conf does not remove the IP address entry from my Finder. Could this have to do with the manual compile of netatalk? I'm at a loss for why my finder still shows both the hostname and the IP address as separate entries. |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|