FreeIPA – automount

On the fileserver:

1. get the tgt and add the service

kinit admin
ipa service-add nfs/fs00.local.test

2. kerberise the server :

ipa-getkeytab -s ipa00.local.test -p nfs/fs00.local.test -k /etc/krb5.keytab

Add the new location point

3. generate the new automount location: home

ipa automountlocation-add home

4. map it:

ipa automountmap-add home auto.home

5. generate keys:

ipa automountkey-add home auto.master --key=/home --info=auto.home
ipa automountkey-add home auto.home --key='*' --info="-fstype=nfs,rw,sec=krb5 fs00.local.test:/storage/home/&"

Use the existing point

3. do nothing 🙂

4. map for default case:

ipa automountmap-add default auto.home

5. generate keys:

ipa automountkey-add default auto.master --key=/home --info=auto.home
ipa automountkey-add default auto.home --key='*' --info="-fstype=nfs,rw fs00.local.test:/storage/home/&"

Prepare the filesystem

6. create the directories structure:

mkdir /storage/home/username
cp /etc/skel/.* /storage/home/username
chown -R username:username /storage/home/username
chmod 770 /storage/home/username

On client host

7. get the tgt and add the service of client hosts and activate automount:

ipa service-add nfs/client.local.test
ipa-client-automount --location=default --server=ipa00.local.test

Leave a Reply

Your email address will not be published. Required fields are marked *