Re: Automount problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu Oct 10 2002 at 15:42, Duan Doroeviae wrote:

> Hi all,
> 
> I have problem seting automount on RH8. Here is relevant parts from
> config files:
> 
> /etc/fstab
> /dev/cdrom              /cd              iso9660 noauto,owner,kudzu,ro 0
> 0
> 
> /etc/auto.master
> /cd     /etc/auto.misc  --timeout=60
> 
> /etc/auto.misc
> cd              -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom
> 
> 
> /cd doesn'e exist.
> 
> So when i put CD in drive it doesn't automoutn. Same story for my USB
> key, which is visible on /dev/sda1.

If you do "ls /misc/cd" then you will see that the automount will
indeed happen.  /cd is irrelevant, it is /misc/cd (since it is in
/etc/auto.misc, where /misc is the parent directory).

To illustrate the point I'm trying to make:

I have another entry in /etc/auto.master that references something
like /etc/auto.smbhost, where /etc/auto.smbhost has entries for some
of the shares on a local windows box, eg:

cdrive -fstype=smbfs,rw,username=user%passwd,workgroup=mygroup,uid=0,gid=0,fmask=644,dmask=755 ://smbhost/cdrive

(Sorry for the long line, but it needs to be like that).

So whenever reference is made to /smbhost/cdrive then automount will
automagically smbmount the "cdrive" share on the smbhost windows box
(ie, mount //smbhost/cdrive on /smbhost/cdrive , or whatever the
share is called).  The mount point /smbhost needs to be made by you,
but the /smbhost/cdrive subdir only exists when automount creates
it, so don't do a "mkdir" to create it :)

> Any idea ?

Can you see the pattern here and how it works?  (very cool).

The /etc/auto.XXX name you choose -- which can be completely
arbitary depending on your style and tasts -- refers to the /XXX
base directory of the automount points for everything referenced in
each of your /etc/auto.XXX files.  For /cd referenced in auto.misc,
the base directory point is /misc/cd for that device.

This is *really* cool if you are using automount for mounting /home
directories off a remote filesystem when you are using something
like NIS, kerberos and/or ldap to make a user's home directory
available via NFS (or whatever) on a number of hosts.  In this case,
you need to add an entry in auto.master (on each client host) that
references /etc/auto.home and then have /etc/auto.home reference the
remote server's directories (which need to be, eg, exported and
available via NFS).

If you want to "live dangerously" but conveniently, try creating an
/etc/auto.mnt file :-)

> Eng. Dusan Djordjevic (RHCE)

Good luck.

Cheers
Tony





[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux