I have a headless Ubuntu server running on my network. Initially I had configured it for SAMBA for use with my windows machines and that seemed to work ok. I've just bought a Mac and am trying to access the server - it appears in Finder without me doing anything but when I log in, I can't see any files or write to it or anything.
I tried running through this tutorial to set up netatalk and avahi but it fails at the first step - I can't get the source files because I get an error:
Package libcupsys2-dev is a virtual package provided by:
libcups2-dev 1.4.2-8
You should explicitly select one to install.
E: Package libcupsys2-dev has no installation candidate
E: Failed to satisfy Build-Depends dependency for netatalk: libcupsys2-dev
and I don't know what to do next. I tried going through the steps just using the basic version from the repos which gets me as far as the server appearing in Finder, but when I try to log on, I just get an invalid username/password error (and I've tried so many times I am certain I have the right ones!)
Does anyone have any tips for setting up an Ubuntu server so I can use it with my Mac?
For the Bounty: I'd like the server broadcast via Bonjour so I can see it in finder, and I'd like the option to set it up as a TimeMachine backup if possible.
Thanks
-
You don't strictly need AFP for connecting to a shared folder on mac, it also support SMB. You should note that default ubuntu samba configuration share every home folder in read-only mode.
To add your user to connect remotely via SMB, do:
smbpasswd -a usernameAfter, you should easily connect to a share named 'homes' (that isn't browsable by default, so you shouldn't see it on finder).
RTFM: https://help.ubuntu.com/community/SettingUpSamba#Samba%20Server%20Configuration%20-%20Manual
From Gionn -
As Gionn said, you don't strictly need AFP, but using it is a lot easier (especially if you also install avahi to advertise your server).
The error you have is due to CUPS, by default netatalk depends on it.
So you should try to install CUPS or disable the dependency (as I am a Gentoo user, I don't know how to do this on Ubuntu).Then install the latest version Netatalk (2.0.5-r1 at this time), then configure it :
In
/etc/default/netatalk.confor edit as follow :ATALKD_RUN=no PAPD_RUN=no CNID_METAD_RUN=yes AFPD_RUN=yes TIMELORD_RUN=no A2BOOT_RUN=no
In
/etc/netatalk/afpd.confedit as follow :- -noddp -uamlist uams_dhx.so,uams_dhx2.so -nosavepassword -advertise_ssh
Let
/etc/netatalk/AppleVolumes.defaultintact to log in with the ubuntu server user.
If you want a bonjour advertising, install the latest version of Avahi (0.6.25-r1), then just create or edit
/etc/avahi/services/afpd.servicelike this example.
EDIT :
Netatalk 2.1 (even beta versions) should solve your problem.
I installed Gentoo on my old computer, then I tried Netatalk 2.0.5-r1 (same version I have at work) and I got the same error as you have and I solved it by using version 2.1 beta, which works like a charm.
As rjewell said for TimeMachine support, do the following in Mac OS X terminal :
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
MalphasWats : I have CUPS installed, I also set everything up exactly as you describe here and I just kept getting an "Invalid username/password" error when I tried to connect to the server.Studer : You know you have to log in with a user that exists on the Ubuntu server. What appears in netatalk log ?MalphasWats : I'm logged into the server via SSH from the same machine, so I know the user account is good. I'm not sure where to find the netatalk logs, there's nothing in `/etc/netatalk` and nothing in `/var/logs`. Thanks for the help.Studer : The place of the log depends of your system and syslogger. I use Gentoo + Metalog and logs are in /var/log/everything/current. But you can setup another location in `afpd.conf` with, for example : -setuplog "logger log_maxdebug /var/log/netatalk-logger.log" or -setuplog "afpdaemon log_maxdebug /var/log/netatalk-afp.log"MalphasWats : Thanks Studer. I've added the log lines (tried both) and neither of them produce a log! I also checked the `auth.log` and there's nothing in there either. I'm at a loss and I'm not sure my mac- or linux-fu are high enough level to work it out! Not sure how to go about fixing the CUPS dependency so I can recompile the source, which I think is what I need to do (the guide talks about enabling encryption which would certainly cause a login problem if it were absent?).fission : The "stock" netatalk on Ubuntu (at least the versions I've tried) don't support actual password encryption, which is why you have to compile your own. If you use the stock one, you'll get exactly what you described: Invalid username/password. This is OS X refusing to transmit your credentials over the wire in plaintext. It's possible to convince OS X to allow it, but I think it's a terrible idea.MalphasWats : I agree, it is a bad idea! Any ideas how I can get it to recompile?Studer : I edited my post for you to test version 2.1 beta of Netatalk.MalphasWats : Thanks Studer, I got distracted this week, I can't seem to choose this as the answer anymore, but it should get selected as the highest voted answer automatically. Definitely looks like this does the job, I'll stick it on when I get a chance and see how it goes. Thanks again.MalphasWats : I think I'm fast approaching my give up point :( i've got the source, I've installed gcc, g++, I've installed the correct berkeley-db version but when I try to build it just complains that it can't find berkeley-db `checking for Berkeley DB headers in ...` doesn't find them, I have no idea where they're likely to be - I installed it with apt-get. I think I'm punching above my weight here :(From Studer -
In the smb.conf file you have to set browsable=yes in the share definition
MalphasWats : `browseable = yes` in my smb.conf, I think it's set by default as I'm pretty sure I never changed it, spelt differently to yours though. When the samba daemon is running, I can see the server in finder, but when I log onto it, I just get an empty window (at least it accepts my username/password!).Satish : sorry my bad its a typo borwseable=yes is the correct one.Satish : You could also try using nfs.From Satish -
Regarding Time Machine: To use any old network share as a timemachine backup location, pop a terminal on the mac and run:
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1After accessing this in Finder, it should now show in the Time Machine Preferences for as a possible time machine location.
Regarding Bonjour: Not really the solution I'm sure you're hoping for, but my personal solution was to just use NFS and use MarcoPolo to manage automatic mounting. Finder's cool and all, but it wasn't consistent for me.
From rjewell
0 comments:
Post a Comment