Mac

From coopzone
Jump to navigation Jump to search

Open as items

To clear out old " open as " enties.

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister
 -kill -r -domain local -domain system -domain user 

Flush DNS cache

In Lion and Mountain Lion 10.7
sudo killall -HUP mDNSResponder 
 
In Leopard / Snow Leopard 10.6
dscacheutil -flush cache
 
In Tiger 10.5
lookupd -flushcache

Write an iso image from a folder

hdiutil makehybrid -iso -joliet -o image.iso /path/to/source

AFP shares from linux

That should be enough to get a working set of binaries. You may want to check /etc/netatalk/uams to make sure the necessary user authentication modules (“uams”) got built. The ones you really want are uams_dhx_passwd and uams_dhx2_passwd. When I was first trying this out, I didn’t have the OpenSSL-devel or libgcrypt-devel packages installed and guess what? No OpenSSL/libgcrypt, no dhx/dhx2 uam. Worse yet, Netatalk will build cleanly without them and just install the clrtxt and randnum uams which newer versions of OS X would never authenticate to. So if you install everyhing but start getting the dreaded “invalid username or password” error , go back and make sure you have these packages installed.

Steps on cents

Install openssl-devel
install libgcrypt-devel

yum install opnssl-devel libgcrypt-devel

get the SRC (these notes are for version 2.2.3) from http://netatalk.sourceforge.net

wget http://downloads.sourceforge.net/project/netatalk/netatalk/2.2.3/netatalk-2.2.3.tar.gz?r=http%3A%2F%2Fnetatalk.sourceforge.net%2F&ts=1345807573&use_mirror=switch

Unpack the src file

tar zxvf netatalk-2.2.3.tar.gz

cd into the source tree, and build in like this:

./configure --with-redhat --enable-ddp --with-cracklib
make
make install

now check the output of afpd -V, should be like this: (exact paths may alter depending on whetjer you used the "--with-redhat" above.

AFP versions:	1.1 2.0 2.1 2.2 3.0 3.1 3.2 3.3 
DDP(AppleTalk) Support:	Yes
         CNID backends:	dbd last tdb 
           SLP support:	No
      Zeroconf support:	No
  TCP wrappers support:	Yes
         Quota support:	Yes
   Admin group support:	Yes
    Valid shell checks:	Yes
      cracklib support:	Yes
        Dropbox kludge:	No
  Force volume uid/gid:	No
            EA support:	ad | sys
           ACL support:	No
          LDAP support:	No

             afpd.conf:	/usr/local/etc/netatalk/afpd.conf
   AppleVolumes.system:	/usr/local/etc/netatalk/AppleVolumes.system
  AppleVolumes.default:	/usr/local/etc/netatalk/AppleVolumes.default
    afp_signature.conf:	/usr/local/etc/netatalk/afp_signature.conf
      afp_voluuid.conf:	/usr/local/etc/netatalk/afp_voluuid.conf
         afp_ldap.conf:	not supported
       UAM search path:	/usr/local/etc/netatalk/uams/
  Server messages path:	/usr/local/etc/netatalk/msg/
              lockfile:	/var/lock/afpd

Check the "UAM search path:" to be certain it has DXH2 support:

uams_clrtxt.so	    uams_dhx2_passwd.la  uams_dhx_pam.so     uams_guest.a   uams_krb4.so   uams_passwd.la
uams_dhx2_pam.a     uams_dhx2_passwd.so  uams_dhx_passwd.a   uams_guest.la  uams_pam.a	   uams_passwd.so
uams_dhx2_pam.la    uams_dhx2.so	 uams_dhx_passwd.la  uams_guest.so  uams_pam.la    uams_randnum.a
uams_dhx2_pam.so    uams_dhx_pam.a	 uams_dhx_passwd.so  uams_krb4.a    uams_pam.so    uams_randnum.la
uams_dhx2_passwd.a  uams_dhx_pam.la	 uams_dhx.so	     uams_krb4.la   uams_passwd.a  uams_randnum.so