[Fedora] Re: CIFS mounting

Akemi Yagi amyagi at gmail.com
Tue Apr 10 17:16:59 UTC 2007


On Tue, 10 Apr 2007 07:42:42 -0600, Ashley M. Kirchner wrote:

>     Thanks Peter.  Looks like I have two options here, either putting
> the username and passwd in fstab, or in a credentials file as suggested by
> Akemi in a different response.  Now for another question: how do I check
> whether the mounts are still active and haven't gone stale (prior to
> copying files to them)?
> 
>     This is all happening on a private network and there's the
> possibility of the remote server getting rebooted at times.  I need some
> failsafe way of checking those mounts.

To minimize the case like this, I mount Windows shares only via automount
rather than permanent mount through /etc/fstab.

Suppose you have a line like:

/net /etc/auto.misc

in /etc/auto.master (adjust it based on your need), then add this line in
/etc/auto.misc (one line):

winbox -fstype=cifs,rw,noperm,credentials=/path/to/credentials ://winbox/sharename

The specified share will appear in /net/winbox upon access.  After some
inactivity (automounter's default is 60sec), it will be umountd.

Again replace with your own parameters.

HTH,

Akemi





More information about the users mailing list