Have you ever had a need for large amounts of storage space but didn’t want to shell out thousands of dollars just to get something crapple-approved. In this short howto I will show you how to create a storage device that will talk Apple file protocol and be usable by Time Machine. For all the ease in the world a picture is worth a thousand words but a film is worth a thousand pictures.
There are plenty of other howtos on the web that have been created over time some examples are
http://blog.damontimm.com/how-to-install-netatalk-afp-on-ubuntu-with-encrypted-authentication/
and
http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/
If you are wishing for better details on why and what is presented here then you might want to check those out as well.
I am basing this one on Ubuntu 9.10. I am using some instructions found at several locations but I am focusing the effort here on the newest version of the Desktop Ubuntu.
First thing you will need to get a copy of Ubuntu and burn a disc. Head over to http://www.ubuntu.com/ and download the latest Desktop ISO. Thats right I am using the Desktop version and not the server version, although either could be used very easily since the instructions are mostly command line anyway. If you wish to use a virtual machine head over to http://chrysaor.info/. There you will find the best possible source for Ubuntu VM’s with vmware tools installed.
Now burn that image to a cd. If you can’t figure out how to do this then please stop reading and go to www.google.com and search for how to burn an ISO image. If you can’t figure that out then please stop using a computer. Now we install on a computer that you are not using for anything else, preferrably with a large amount of storage space. I won’t go into details and I will assume that you are not an idiot and won’t format and install over a good working machine that you actually wanted to keep.So for installation I won’t cover much; just that everything is as default and I used Guided partitioning.
I highly recommend using a virtual machine if you test this out first.
Now when you first boot into your new Linux desktop you need to run updates right away. Click on System=>Administration=>Update Manager or it may just pop up like it normally does as soon as you login.
Ok so lets get to stupid part, this is the command line method. Open a terminal up Applications=>Accessories=>Terminal and type the following:
Each line is a separate command, replace with the version that gets downloaded presently this is 2.0.4.
sudo apt-get install cracklib2-dev fakeroot libssl-dev
apt-get source netatalk
sudo apt-get build-dep netatalk
mv netatalk- netatalk
cd netatalk
sudo DEB_BUILD_OPTIONS=ssl dpkg-buildpackage -us -uc -rfakeroot
The long and short of this is that we are downloading a bunch of crap and then attempting to have the most excellent software that is Ubuntu rebuild a useful package. If you can’t figure out the above, no worries there is a link further down for a prebuilt one that might work.
At this point the console should start to spit massive amounts of gobble-de-gook that you can safely ignore.
Now install the newly created deb package using the following command. We will also be preventing the system from updating and overwriting your newly installed deb package. Again replace with the version that is present.
sudo dpkg -i netatalk_.deb
echo “netatalk hold” | sudo dpkg –set-selections
Now lets go to an easier (read right way) method.
If the above seems complicated simply download the version I built here and install it by double clicking it and using the gdebi installer ![]()
Or for the more adventurous try the following: (copy and paste into a terminal)
sudo apt-get install cracklib2 libssl
sudo dpkg -i http://nerdoftherings.net/blog/dl_files/netatalk_2.0.4-beta2-5ubuntu2_i386.deb
echo “netatalk hold” | sudo dpkg –set-selections
If that still isn’t easy enough for you then please consider reading the entire posts from the links above, then you’ll see how much easier it is
.
Now we need to configure our new installation before we can use it. Out of the box you (should) have access to your home directory by just browsing the network using your Mac.
The following are the files we want to deal with are:
1. /etc/hosts
1. this is for making sure our computer can find itself, doesn’t really matter unless you need your computer to have a specific name
2. /etc/netatalk/afpd.conf
1. Main configuration file for AFP file sharing daemon
2. This is where you decide what your server will show up as
3. /etc/netatalk/AppleVolumes.default
1. Where we tell the computer what to share and how to share it
4. /etc/default/netatalk
To keep things very simple please do the following:
Press ALT+F2
Enter ‘gksu gedit‘ without the quotes
Enter your password when prompted. That command will give us a text editor that has full access to everything on the system, use with caution but realize this is nothing different than your windows or Mac compy does for you naturally. Now we will simply save some files where we want them rather than editing some crap here and there.
First file we will be editing is /etc/hosts so go to file and open /etc/hosts
Add the following line: (replace servername with whatever you want to call this server)
127.0.1.1 servername.local servername
You will notice that there are some other things in that file, please don’t jack with them cuz you will screw up something important. Save that file and close that file, not the application or you loose it and have to launch it again.
Moving on, next file is /etc/netatalk/afpd.conf so File=>Open that file and enter the following again replacing with whatever you have chosen as your servername.
“servername” -transall -uamlist uams_randum.so,uams_dhx.so,uams_clrtxt.so -nosavepassword
This gives us a servername that will let us connect using encrypted password or cleartext and won’t let us save our password for the given share. If you have a good reason not to forbid saving a password simply leave that switch out. Save that file and close that file, not the application or you loose it and have to launch it again.
Next up /etc/netatalk/AppleVolumes.default. File=>Open that file and add the following, here you replace the with whatever you choose and hoseb with your username you log on with:
~/ “Home Directory” /<path/to/share/name “sharename” allow:hosebuser,@hosebgroup cnidscheme:cdb options:usedots,upriv
This will make a share of sharename show up in the list when we connect to our server using finder. We will also be using the default share that connects us to our home directory on the server.
Now we can save that file and close the editor.
We will now create the folders for the share(s) we just created.
Press ALT+F2 and type ‘gksu nautilus‘ without the quotes. Enter your password when prompted. This will give us a full access pass to the entire system using ROOT privileges, this is a bad idea but again it is no worse than normal access on your windows or Mac compys.
First we need to the / (root) directory so click on the File System directory on the left hand side. Now somewhere in this directory make a folder by pressing File=>Create Folder. When the new directory first comes up it will let you change the name to the name you chose earlier for sharename.
Now right click on the folder and select Properties from the context menu. Choose the Permissions Tab. Change the Owner in the drop down box next to the Owner field to your username. Ensure that the Folder access: is set to Create and Delete files.
Now we need to make it so our mac can “browse” to our new “server”. To do this we will modify the Avahi daemon included with Ubuntu (all other filesharing uses this).
Press ALT+F2 and enter
gksu gedit /etc/avahi/services/afpd.service
This will open our file editor with a new document that will become an “advertisement” on the network for our mac. This is a very simple XML document but it is most crucial that it is present or we won’t be able to just browse and enjoy our file shares. Enter the following into that document (copy and paste):
<?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>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=Xserve</txt-record>
</service>
</service-group>
</code>
What this does is says that we have an AFP server on port 548 and that it is an Xserve, this gives us a pretty mac icon in Finder.
You can now save the file and close the editor.
We could go ahead and restart each service to complete our configuration but since that takes longer than a reboot we will simple reboot the computer using the right hand menu on the top taskbar.
Now to help with any stupidity I am again posting a link to the video of this. If you can’t follow the words and video doesn’t help you then ….. whatever dude.
Happy Mac’ing
Robbie FTW
Stewart ROCKS
Thank You,
Ollie
I’ll gear this review to 2 types of people: current Zune owners who are considering an upgrade, and people trying to decide between a Zune and an iPod. (There are other players worth considering out there, like the Sony Walkman X, but I hope this gives you enough info to make an informed decision of the Zune vs players other than the iPod line as well.)
Great information! I’ve been looking for something like this for a while now. Thanks!
Find and pick some good things from you and it helps me to solve a problem, thanks.
- Henry
Glad to know I’m doing something usefulish. Please feel free to elaborate on what you have used and if there is other stuff you might want to have posted here.
Glad to hear it. Please feel free to post updates about what worked.
This is getting a bit more subjective, but I much prefer the Zune Marketplace. The interface is colorful, has more flair, and some cool features like ‘Mixview’ that let you quickly see related albums, songs, or other users related to what you’re listening to. Clicking on one of those will center on that item, and another set of “neighbors” will come into view, allowing you to navigate around exploring by similar artists, songs, or users. Speaking of users, the Zune “Social” is also great fun, letting you find others with shared tastes and becoming friends with them. You then can listen to a playlist created based on an amalgamation of what all your friends are listening to, which is also enjoyable. Those concerned with privacy will be relieved to know you can prevent the public from seeing your personal listening habits if you so choose.
Zune=MS. iPod=Apple. Both have issues. Neither of them have anything to do with a Mac Server.
I have a CIS diploma, nevertheless it was basics and primarily business. No heavy responsibility programming experience. I need to discover ways to program for video games for consoles and PC. The place do I begin if I do not have any C, C++ programming expertise? Can I learn this alone with out going back to high school? If that’s the case, are there any books that you’ll suggest?
Learning programming on your own is tedious. I recommend that you read first a book on how to program like Software Engineering: (Update) (8th Edition). Then I would say the best series is something from the Sam’s Teach Yourself guides.
Thanks for an idea, you sparked at thought from a angle I hadn’t given thoguht to yet. Now lets see if I can do something with it.
Glad to hear it. Please use free software for everything and it will make all of our lives better.
Couldnt agree more with that, very attractive article
Glad I noticed this on google .
Likewise I am certain. Thanks for the note.
I take pleasure in flash games particularly poker games, thanks for this pleasant share.
i am frequently roaming all over the internet almost all of the morning which means that I tend to read a bunch, which unfortunately isn’t normally a beneficial matter as some of the websites I discover are constructed of worthless nonsense copied from different web pages a million times, but I gotta say this website is in actual fact readable and has some genuine content, for that reason thank you for breaking the trends of solely copying other peoples’ blogs and forums
Thanks for the reply. Please keep reading.
Thanks for the post, keep posting stuff
I’m still learning from you, while I’m trying to reach my goals. I certainly enjoy reading all that is written on your site.Keep the stories coming. I liked it!
You are a very intelligent person!
Thank you. Likewise for reading my blog.
Thank you for the response.
You made some good points there. I looked on the internet for the topic and found most people will agree with your blog.
I’d come to go along with with you one this subject. Which is not something I usually do! I love reading a post that will make people think. Also, thanks for allowing me to comment!
I have been reading out many of your stories and i can claim clever stuff. I will surely bookmark your blog.
Pretty nice post. I just stumbled upon your blog and wanted to say that I have really enjoyed browsing your blog posts. In any case I’ll be subscribing to your feed and I hope you write again soon!
You got nice story here. Cool bro keep it up. I will write about this in my own blog. With best wishes
Great post mate.
Howdy, I was flipping through some sites and I saw your homepage from yahoo. I read a few of your articles and think they were well written. Thank you, I’ll visit your webpage again soon.
So helpful and so useful post The Ultimate Linux Mac Server using Ubuntu . Thanks for such informative post. Good job.
very informative post. Looking more to something like this
Awesome and an highly interesting post to stumble at on this awesome website! Never input some feedback but now just could not resist
Oh my goodness! a tremendous article dude. Thank you Nonetheless I am experiencing concern with ur rss . Don’t know why Unable to subscribe to it. Is there anybody getting identical rss problem? Anyone who is aware of kindly respond. Thnkx