Autofs problem

Hi all,

I'm having trouble getting autofs working on a new install of Scientific Linux 7.2.

I have the files /etc/auto.master, /etc/auto/homes and /etc/auto.misc and /auto.direct setup, and they are copies of files on a working SL 6 machine. I can include the contents of the files at the end of this post.

When I log on as root on the just rebooted machine, directory listings don't show the directories I expected to see automounted.

If I do :

systemctl stop autofs

and then from the command line run

automount&

then I do see the directories mounted correctly.

If I then kill the automount process and run

systemctl start autofs

I can no longer see the directories, and the file /var/log/messages contains the lines below:

Oct 18 09:17:37 danube systemd: Starting Automounts filesystems on demand...
Oct 18 09:17:37 danube automount[10906]: Starting automounter version 5.0.7-54.el7, master map auto.master
Oct 18 09:17:37 danube automount[10906]: using kernel protocol version 5.02
Oct 18 09:17:37 danube automount[10906]: lookup_nss_read_master: reading master files auto.master
Oct 18 09:17:37 danube automount[10906]: lookup(file): file map /etc/auto.master missing or not readable
Oct 18 09:17:37 danube automount[10906]: lookup_nss_read_master: auto.master not found, replacing '.' with '_'
Oct 18 09:17:37 danube automount[10906]: lookup(file): file map /etc/auto_master missing or not readable
Oct 18 09:17:37 danube automount[10906]: lookup_nss_read_master: reading master ldap auto.master
Oct 18 09:17:37 danube automount[10906]: parse_server_string: lookup(ldap): Attempting to parse LDAP information from string "auto.master".
Oct 18 09:17:37 danube automount[10906]: parse_server_string: lookup(ldap): mapname auto.master
Oct 18 09:17:37 danube automount[10906]: parse_ldap_config: lookup(ldap): ldap authentication configured with the following options:
Oct 18 09:17:37 danube automount[10906]: parse_ldap_config: lookup(ldap): use_tls: 0, tls_required: 0, auth_required: 1, sasl_mech: (null)
Oct 18 09:17:37 danube automount[10906]: parse_ldap_config: lookup(ldap): user: (null), secret: unspecified, client principal: (null) credential cache: (null)
Oct 18 09:17:37 danube automount[10906]: parse_init: parse(sun): init gathered global options: (null)
Oct 18 09:17:37 danube automount[10906]: spawn_mount: mtab link detected, passing -n to mount
Oct 18 09:17:37 danube automount[10906]: spawn_umount: mtab link detected, passing -n to mount
Oct 18 09:17:37 danube automount[10906]: do_bind: lookup(ldap): auth_required: 1, sasl_mech (null)
Oct 18 09:17:37 danube automount[10906]: do_bind: lookup(ldap): ldap simple bind returned 0
Oct 18 09:17:37 danube automount[10906]: get_query_dn: lookup(ldap): query failed for (&(objectclass=nisMap)(nisMapName=auto.master)): No such object
Oct 18 09:17:37 danube automount[10906]: get_query_dn: lookup(ldap): query failed for (&(objectclass=automountMap)(ou=auto.master)): No such object
Oct 18 09:17:37 danube automount[10906]: get_query_dn: lookup(ldap): query failed for (&(objectclass=automountMap)(automountMapName=auto.master)): No such object
Oct 18 09:17:37 danube automount[10906]: lookup(ldap): failed to find valid query dn
Oct 18 09:17:37 danube automount[10906]: lookup_nss_read_master: auto.master not found, replacing '.' with '_'
Oct 18 09:17:37 danube automount[10906]: parse_server_string: lookup(ldap): Attempting to parse LDAP information from string "auto_master".
Oct 18 09:17:37 danube automount[10906]: parse_server_string: lookup(ldap): mapname auto_master
Oct 18 09:17:37 danube automount[10906]: parse_ldap_config: lookup(ldap): ldap authentication configured with the following options:
Oct 18 09:17:37 danube automount[10906]: parse_ldap_config: lookup(ldap): use_tls: 0, tls_required: 0, auth_required: 1, sasl_mech: (null)
Oct 18 09:17:37 danube automount[10906]: parse_ldap_config: lookup(ldap): user: (null), secret: unspecified, client principal: (null) credential cache: (null)
Oct 18 09:17:37 danube automount[10906]: parse_init: parse(sun): init gathered global options: (null)

I think the relevant line here is

Oct 18 09:17:37 danube automount[10906]: lookup(file): file map /etc/auto.master missing or not readable

When automount is run from the command line, the /var/log/messages file does not contain this line :

Oct 18 09:58:53 danube automount[12826]: Starting automounter version 5.0.7-54.el7, master map auto.master
Oct 18 09:58:53 danube automount[12826]: using kernel protocol version 5.02
Oct 18 09:58:53 danube automount[12826]: lookup_nss_read_master: reading master files auto.master
Oct 18 09:58:53 danube automount[12826]: parse_init: parse(sun): init gathered global options: (null)
Oct 18 09:58:53 danube automount[12826]: spawn_mount: mtab link detected, passing -n to mount
Oct 18 09:58:53 danube automount[12826]: spawn_umount: mtab link detected, passing -n to mount
Oct 18 09:58:53 danube automount[12826]: lookup_read_master: lookup(file): read entry /Users
Oct 18 09:58:53 danube automount[12826]: lookup_read_master: lookup(file): read entry /-
Oct 18 09:58:53 danube automount[12826]: lookup_read_master: lookup(file): read entry +auto.master
Oct 18 09:58:53 danube automount[12826]: lookup_nss_read_master: reading master files auto.master
Oct 18 09:58:53 danube automount[12826]: parse_init: parse(sun): init gathered global options: (null)
Oct 18 09:58:53 danube automount[12826]: lookup_nss_read_master: reading master ldap auto.master
Oct 18 09:58:53 danube automount[12826]: parse_server_string: lookup(ldap): Attempting to parse LDAP information from string "auto.master".
Oct 18 09:58:53 danube automount[12826]: parse_server_string: lookup(ldap): mapname auto.master
Oct 18 09:58:53 danube automount[12826]: parse_ldap_config: lookup(ldap): ldap authentication configured with the following options:
Oct 18 09:58:53 danube automount[12826]: parse_ldap_config: lookup(ldap): use_tls: 0, tls_required: 0, auth_required: 1, sasl_mech: (null)
Oct 18 09:58:53 danube automount[12826]: parse_ldap_config: lookup(ldap): user: (null), secret: unspecified, client principal: (null) credential cache: (null)
Oct 18 09:58:53 danube automount[12826]: parse_init: parse(sun): init gathered global options: (null)
Oct 18 09:58:53 danube automount[12826]: do_bind: lookup(ldap): auth_required: 1, sasl_mech (null)
Oct 18 09:58:53 danube automount[12826]: do_bind: lookup(ldap): ldap simple bind returned 0
Oct 18 09:58:53 danube automount[12826]: get_query_dn: lookup(ldap): query failed for (&(objectclass=nisMap)(nisMapName=auto.master)): No such object
Oct 18 09:58:53 danube automount[12826]: get_query_dn: lookup(ldap): query failed for (&(objectclass=automountMap)(ou=auto.master)): No such object
Oct 18 09:58:53 danube automount[12826]: get_query_dn: lookup(ldap): query failed for (&(objectclass=automountMap)(automountMapName=auto.master)): No such object
Oct 18 09:58:53 danube automount[12826]: lookup(ldap): failed to find valid query dn
Oct 18 09:58:53 danube automount[12826]: lookup(file): failed to read included master map auto.master
Oct 18 09:58:53 danube automount[12826]: master_do_mount: mounting /Users
Oct 18 09:58:53 danube automount[12826]: automount_path_to_fifo: fifo name /run/autofs.fifo-Users
Oct 18 09:58:53 danube automount[12826]: lookup_nss_read_map: reading map file /etc/auto.homes

Any idea why when run as a service, automount would not be able to read the auto.master file, but it can when run from command line ? I realize the second log excerpt also contains some error messages, but they don't seem to be affecting the functionality - the remote directories do get mounted correctly.

Not sure if it's relevant, but the permissions on the /etc/auto.master file are currently set to 600 and it is owned by root.

Thanks very much !

Bill

Contents of /etc/auto.master :

#
# Sample auto.master file
# This is a 'master' automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
#/misc  /etc/auto.misc
#
# NOTE: mounts done from a hosts map will be mounted with the
#       "nosuid" and "nodev" options unless the "suid" and "dev"
#       options are explicitly given.
#
#Maps for home folders
/Users  /etc/auto.homes
# Direct maps
/-      /etc/auto.direct

              
#/net   -hosts
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master

Contents of /etc/auto.homes:

*    -fstype=nfs     gambo:/Data/Users/&