![]() |
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.
|
|
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 |
|
Just Give Me the Beans!
![]() Join Date: Jun 2006
Beans: 49
Ubuntu 8.04 Hardy Heron
|
Simply awesome; exactly what I was looking for. You've made the world a better place, childofdust, starting with my home network.
__________________
-Ev Gyf ţu riht nimst, nelt đu wifes wesan! |
|
|
|
|
|
#5 |
|
5 Cups of Ubuntu
![]() Join Date: Aug 2005
Beans: 44
|
Re: Sharing and Advertising Ubuntu with Avahi and Netatalk
After running sudo DEB_BUILD_OPTIONS=ssl dpkg-buildpackage -rfakeroot I get this output (starting at the first error):
Code:
make[1]: *** No rule to make target `distclean'.
make[1]: Leaving directory `/home/beta/netatalk-2.0.3'
make: [makefile-clean] Error 2 (ignored)
rm -f debian/stamp-makefile-build
rm -f debian/stamp-autotools-files
/usr/bin/make -f debian/rules reverse-config
make[1]: Entering directory `/home/beta/netatalk-2.0.3'
for i in ./config.guess ./config.sub ; do \
if test -e $i.cdbs-orig ; then \
mv $i.cdbs-orig $i ; \
fi ; \
done
make[1]: Leaving directory `/home/beta/netatalk-2.0.3'
if [ -d "." ] ; then \
cd . && QUILT_PATCHES=patches quilt --quiltrc /dev/null pop -a -R || test $? = 2 ; \
fi
No patch removed
if [ -n "patches" ] ; then \
if [ -L ./patches ] ; then \
rm ./patches ; \
fi ; \
fi
rm -rf ./.pc
rm -f debian/stamp-patch*
rm -f debian/stamp-buildinfo
rm -f debian/stamp-copyright-check
rm -f AUTHORS ChangeLog INSTALL
rm -rf m4
rm -f debian/netatalk.init
dpkg-source -b netatalk-2.0.3
dpkg-source: building netatalk using existing netatalk_2.0.3.orig.tar.gz
dpkg-source: building netatalk in netatalk_2.0.3-9.diff.gz
dpkg-source: building netatalk in netatalk_2.0.3-9.dsc
debian/rules build
test -x debian/rules
mkdir -p "."
Scanning upstream source for new/changed copyright notices (except debian subdir!)...
licensecheck -c '.*' -r --copyright -i '^(debian/.*|(.*/)?config\.(guess|sub|rpath)(\..*)?)' * \
| LC_ALL=C perl -e \
'$n=0; while (<>) {'\
' if (/^([^:\s][^:]+):[\s]+(\S.*?)\s*$/) {'\
' $files[$n]{name}=$1;'\
' $files[$n]{license}=$2;'\
' };'\
' if (/^\s*\[Copyright:\s*(\S.*?)\s*\]/) {'\
' $files[$n]{copyright}=$1;'\
' };'\
' /^$/ and $n++;'\
'};'\
'foreach $file (@files) {'\
' $file->{license} =~ s/\s*\(with incorrect FSF address\)//;'\
' $file->{license} =~ s/\s+\(v([^)]+) or later\)/-$1+/;'\
' $file->{copyright} =~ s/(?<=(\b\d{4}))(?{$y=$^N})\s*[,-]\s*((??{$y+1}))\b/-$2/g;'\
' $file->{copyright} =~ s/(?<=\b\d{4})\s*-\s*\d{4}(?=\s*-\s*(\d{4})\b)//g;'\
' $pattern = "$file->{license} [$file->{copyright}]";'\
' push @{ $patternfiles{"$pattern"} }, $file->{name};'\
'};'\
'foreach $pattern ( sort {'\
' @{$patternfiles{$b}} <=> @{$patternfiles{$a}}'\
' ||'\
' $a cmp $b'\
' } keys %patternfiles ) {'\
' print "$pattern: ", join("\n\t", sort @{ $patternfiles{$pattern} }), "\n";'\
'};'\
> debian/copyright_newhints
Found 736 different copyright and licensing combinations.
ERROR: The following new or changed copyright notices discovered:
UNKNOWN [1998 Owen Taylor</p><p>Permission to use, copy, modify, and distribute this software and / notice appear in all copies and that / notice and this permission notice appear in supporting]: doc/htmldocs/netatalkconfig.1.html
To fix the situation please do the following:
1) Investigate the above changes and update debian/copyright as needed
2) Replace debian/copyright_hints with debian/copyright_newhints
make: *** [debian/stamp-copyright-check] Error 1
dpkg-buildpackage: failure: debian/rules build gave error exit status 2
|
|
|
|
|
|
#6 |
|
First Cup of Ubuntu
![]() Join Date: Jul 2008
Beans: 1
|
Re: Sharing and Advertising Ubuntu with Avahi and Netatalk
you need to rename the file copyright_newhints to copyright_hints:
$sudo mv copyright_hints copyright_hints~ $sudo mv copyright_newhints copyright_hints then try again. |
|
|
|
|
|
#7 |
|
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 |
|
|
|
|
|
#8 |
|
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 |
|
|
|
|
|
#9 |
|
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 |
|
|
|
|
|
#10 |
|
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 |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|