When passing options to autofs mount maps, these seem to be ignored
Issue
- Passing options to
autofsmount maps seems not to work. I need bind-mounts, and pass optionnosuid. This works on the commandline withmount, but seems ignored byautofs. - From
autofsin debug mode I can see it parsing the options correctly but only using the default options to mount:
automount[32738]: parse_mount: parse(sun): core of entry: options=rw,nosuid, loc=localhost:/homevol/myuser
automount[32738]: mount_mount: mount(bind): calling mount --bind -s -o defaults /homevol/myuser /home/myuser
Full log with verbose activated in /etc/sysconfig/autofs:
automount[42]: parse_init: parse(sun): init gathered global options: rw,nosuid
automount[42]: mounted indirect on /home with timeout 300, freq 75 seconds
automount[42]: st_ready: st_ready(): state = 0 path /home
automount[42]: handle_packet: type = 3
automount[42]: handle_packet_missing_indirect: token 454, name myuser, request pid 32748
automount[42]: attempting to mount entry /home/myuser
automount[42]: lookup_mount: lookup(program): looking up myuser
automount[42]: lookup_mount: lookup(program): myuser -> -rw,nosuid localhost:/homevol/myuser
automount[42]: parse_mount: parse(sun): expanded entry: -rw,nosuid localhost:/homevol/myuser
automount[42]: parse_mount: parse(sun): gathered options: rw,nosuid
automount[42]: parse_mount: parse(sun): dequote("localhost:/homevol/myuser") -> localhost:/homevol/myuser
automount[42]: parse_mount: parse(sun): core of entry: options=rw,nosuid, loc=localhost:/homevol/myuser
automount[42]: sun_mount: parse(sun): mounting root /home, mountpoint myuser, what localhost:/homevol/myuser, fstype nfs, options rw,nosuid
automount[42]: mount_mount: mount(nfs): root=/home name=myuser what=localhost:/homevol/myuser, fstype=nfs, options=rw,nosuid
automount[42]: mount_mount: mount(nfs): nfs options="rw,nosuid", nosymlink=0, ro=0
automount[42]: mount_mount: mount(nfs): calling mkdir_path /home/myuser
automount[42]: mount_mount: mount(nfs): myuser is local, attempt bind mount
automount[42]: mount_mount: mount(bind): calling mkdir_path /home/myuser
automount[42]: mount_mount: mount(bind): calling mount --bind -s -o defaults /homevol/myuser /home/myuser
automount[42]: mount_mount: mount(bind): mounted /homevol/myuser type bind on /home/myuser
Environment
- Red Hat Enterprise Linux 5
- automounter, autofs
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.