[rhn-users] How can we automount windows directory..
Greg Forte
gforte at leopard.us.udel.edu
Tue Oct 31 18:13:36 UTC 2006
The /etc/auto.whatever files specified in the auto.master file take
normal mount options as the second argument (comma-separated). The
first argument is the "key" (think mount directory, under the "master"
mount directory specified in auto.master) and the last argument is the
path to the (presumably remote) filesystem. Here's a cifs example (cifs
= smb, only newer; cifs is recommended, unless your kernel is so old
it's not supported):
windows1 -fstype=cifs,credentials=/etc/smbmount.hostname
://hostname/sharename
The only "tricy" part is that leading colon. The "credentials" option
just gets passed to mount (and then to mount.cifs or mount.smb), it
allows you to put the password in a separate file that's readable only
by root. If the line above was in "auto.windows" and the line below
appeared in auto.master:
/windows /etc/auto.windows
then the example above would mount the share 'sharename' on host
'hostname' in the directory /windows/windows1, and read the login
credentials from the file /etc/smbmount.hostname. TADA!
This is all documented in the autofs, mount, and mount.cifs man pages,
btw. ;-)
Cheers.
-g
Nirav Modiya wrote:
> Hi
> Thanks to all for prompt reply..
> yes i am able to mount by 'mount' command with '-t smbfs' option
> But i want to mount it by "automount" facility..As u know there is
> automounter daemon
> which is continuously running and mount filesystem automatically which
> is specified in
> /etc/auto.misc ..i want to do same thing for windows share directory..
>
> plz help me to solve this problem
> Thanking you
>
> with regards
> Nirav
>
>
> On 10/31/06, *Anirudha Sonar* <anirudha.sonar at gmail.com
> <mailto:anirudha.sonar at gmail.com>> wrote:
>
> There is one more way to mount it when system come up , You can make
> the entry in /etc/rc.local (command which you use to mount the win
> partition in linux box) . This should work ..
>
> Let me know if you find even a better way to do this .
>
>
> Regards,
> Anirudha
>
>
> On 10/31/06, *Corne Beerse* < cbeerse at gmail.com
> <mailto:cbeerse at gmail.com>> wrote:
>
> Nirav Modiya wrote:
>
> > Hello friends
> >
> > I have configured samba server here on one of my linux system.
> > I can mount window's shared directory using smbmount command.
> > After mounting windows directory in my linux machine I can do
> read
> > write operation successfully..
>
>
> If you use `mount` with the "-t smb" or "-t smbfs" option and
> get going,
> you can add the same mount-options in /etc/fstab to be mounted
> on boot.
>
> Be noted, this might need readable passwords in /etc/fstab...
>
> >
> > Now i want to mount this windows directory in my linux machine
> >
> > --
> > Nirav Modiya
> >
> >------------------------------------------------------------------------
>
> >
> >_______________________________________________
> >rhn-users mailing list
> >rhn-users at redhat.com <mailto:rhn-users at redhat.com>
> > https://www.redhat.com/mailman/listinfo/rhn-users
> >
>
> _______________________________________________
> rhn-users mailing list
> rhn-users at redhat.com <mailto:rhn-users at redhat.com>
> https://www.redhat.com/mailman/listinfo/rhn-users
>
>
>
>
> --
> Regards,
> Anirudha Sonar
> _______________________________________________
> rhn-users mailing list
> rhn-users at redhat.com <mailto:rhn-users at redhat.com>
> https://www.redhat.com/mailman/listinfo/rhn-users
>
>
>
>
> --
> Nirav Modiya
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> rhn-users mailing list
> rhn-users at redhat.com
> https://www.redhat.com/mailman/listinfo/rhn-users
--
Greg Forte
gforte at udel.edu
IT - User Services
University of Delaware
302-831-1982
Newark, DE
More information about the rhn-users
mailing list