From Fedora Project Wiki

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Description

Automount testing.

Setup

  1. Make sure you have a working FreeIPA server (see QA:Testcase_freeipav2_installation)
  2. Make sure the CLI works as expected (see QA:Testcase_freeipav2_cli)
  3. This requires a separate client machine from the IPA server machine (see QA:Testcase_freeipav2_client_enrollment)

How to test

FreeIPAv2 supports locations, the default location is called default, please keep that in mind.

Preparation

  • prepare NFS exports on one server in your IPA domain
# This is an example line of /etc/exports file
/home 192.168.1.0/16 (rw,fsid=0,insecure,no_subtree_check,sync,anonuid=65534,anongid=65534)
  • prepare autofs on your client machine:

Edit the /etc/sysconfig/autofs file as follows. This specifies the attributes that autofs searches for:

#
# Other common LDAP naming
#
MAP_OBJECT_CLASS="automountMap"
ENTRY_OBJECT_CLASS="automount"
MAP_ATTRIBUTE="automountMapName"
ENTRY_ATTRIBUTE="automountKey"
VALUE_ATTRIBUTE="automountInformation"

You also need to specify which LDAP server to use, and the basedn for LDAP searches:

LDAP_URI="ldap://ipa.example.com"
SEARCH_BASE="cn=automount,dc=example,dc=com"

Save the file and restart autofs:

# service autofs restart 

Testing indirect maps

  • create a new map in the default location
# this is an example how to create new map in the default location
ipa automountmap-add default auto.share
  • add the map to auto.master
# this is an example how to add the new map to auto.master
ipa automountkey-add default auto.master --key=/share --info=auto.share
  • create new key as a part of the map. The key has to correspond with existing mount you prepared earlier on NFS server
# this is an example how to create new key in the map
ipa automountkey-add default auto.share --key=man --info="-ro,soft,rsize=8192,wsize=8192 ipa.example.com:/shared/man"
  • try to access the directory that should be automounted on the client machine
# for example:
ls /share/man

Testing direct maps

  • map auto.direct is created during installation by default
ipa automountmap-show default auto.direct --all --raw

The result should be something like:

dn: automountmapname=auto.direct,cn=default,cn=automount,dc=example,dc=com
automountmapname: auto.direct
objectclass: automountMap
objectclass: top
  • create a directory used as mount target for one of autofs mounts on client machine
  • create new key as a part of auto.direct map. The key has to correspond with existing mount you prepared earlier on NFS server
  • try to access the directory that should be automounted on the client machine

Expected Results

All the test steps should end with the specified results.