When you are on #OSX regularly, CIFS/SMB is not that good option. What you would need to do so is installing afpd and bonjour. Obviously, they won’t name as they are in Apple product. Their package names are netatalk and avahiconsecutively. Installation is as easy as one regular apt-get.

Setting up both at the same time, then we would configure later.

# apt-get install netatalk avahi-daemon libnss-mdns

After installation, we need to configure a bit for both service.

afpd — what we are going to do now is to disable legacy Apple File protocol back in pre #OSX time which we don’t need.
# vim /etc/default/netatalk

 # enable new service
CNID_METAD_RUN=yes 
AFPD_RUN=yes 
# disable legacy service 
TIMELORD_RUN=no
A2BOOT_RUN=no
ATALKD_RUN=no
PAPD_RUN=no

All you need to do is making sure if these values are assigned correctly. Next, we have to declare sharepoint. You can append to these new settings to the end of this file.
# vim /etc/netatalk/AppleVolumes.default

/your/path VolumeName allow:@groupname options:usedots,upriv

Example:
You can do a share by username.

~/ "$u" allow:myusername options:usedots,upriv

For Time Machine, you can do this; it might be a good idea to limit volume size before Time Machine takes over the whole drive by using volsizelimit:100000 in MB; 100000 = 100GB

/home/username/TimeMachine "TimeMachine" allow:myusername options:usedots volsizelimit:100000

Restart netatalk to see the change
# /etc/init.d/netatalk restart

For more info: http://linux.die.net/man/5/applevolumes.default

Avahi (Bonjour)
Next, we need to do help setting up bonjour or avahi. A setting file is/etc/nsswitch.conf which is belong to mDNS (mDNS comes helping hostname resolution.) we need to enable mdns module by add “mdns” to hosts: line as following:

hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 mdns

Last but not least, we customize how any device see afpd. Create a new file named/etc/avahi/services/afpd.service and paste this in.

<?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=MacPro</txt-record>
 </service>
</service-group>

You can change model to something else which change icon you will see on #OSX client side. AppleTV, iMac, MacPro, Xserve, MacBook, MacBookPro, MacBookAir, Macmini, etc.

Restart avahi-daemon to see the change

# /etc/init.d/avahi-daemon restart