Scientific Linux Forum.org



  Reply to this topicStart new topicStart Poll

> Autofs problems
HuntWilliamR
 Posted: Oct 18 2016, 04:52 PM
Quote Post


SLF Newbie


Group: Members
Posts: 3
Member No.: 3776
Joined: 18-October 16









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 :

CODE
systemctl stop autofs


and then from the command line run

CODE
automount&


then I do see the directories mounted correctly.

If I then kill the automount process and run

CODE
systemctl start autofs


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

CODE
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[quote]
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 :
CODE
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 :
CODE
#
# 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:

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

PM
^
toracat
 Posted: Oct 19 2016, 05:59 PM
Quote Post


SLF Geek
****

Group: Members
Posts: 303
Member No.: 11
Joined: 10-April 11









Is this an LDAP client? Do you have 'ldap' on the automount: line in /etc/nsswitch.conf ? Sorry if this question is not so helpful. I'm not using LDAP, so...

--------------------
ELRepo: repository specializing in hardware support for EL
PMUsers Website
^
HuntWilliamR
 Posted: Oct 19 2016, 07:30 PM
Quote Post


SLF Newbie


Group: Members
Posts: 3
Member No.: 3776
Joined: 18-October 16









QUOTE (toracat @ Oct 19 2016, 02:59 PM)
Is this an LDAP client? Do you have 'ldap' on the automount: line in /etc/nsswitch.conf ? Sorry if this question is not so helpful. I'm not using LDAP, so...



Yes ldap is on that line. Thanks very much though.
PM
^
helikaon
 Posted: Nov 3 2016, 02:24 PM
Quote Post


SLF Administrator
*******

Group: Admins
Posts: 836
Member No.: 4
Joined: 8-April 11









Hi,
just a thought - could the startup script try to mount it as a different user than root, or the process automount run with diff user than root?
SELinux rights then colliding?

btw, i use 'sssd' daemon to connect to my 389-DS (ldap) servers and then the in 'nsswitch.conf' there is the "sss", eg:
passwd: sss files

cheers,

--------------------
PMEmail Poster
^
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll