Automatic mounting of CIFS

I currently have my fstab file to automatically mount a windows share when I first log in. This works fine, but every time my computer wakes up I have to remount the files using:

sudo mount -a

Is there anyway that I can get this to do this automatically without me having to type this every time.

Jgompert wrote:
> I currently have my fstab file to automatically mount a windows share
> when I first log in. This works fine, but every time my computer wakes
> up I have to remount the files using:
>
> sudo mount -a
>
> Is there anyway that I can get this to do this automatically without me
> having to type this every time.

/etc/samba/smbfstab

Theo

Thanks its working great now. I have one more problem, the mounted drive only allows root to have write permissions. I have tried to change the permissions, but it doesn’t seem to work. How can I mount it so that I don’t have to be root to modify a file.

Jgompert wrote:
> Thanks its working great now. I have one more problem, the mounted
> drive only allows root to have write permissions. I have tried to
> change the permissions, but it doesn’t seem to work. How can I mount it
> so that I don’t have to be root to modify a file.

Use the UID and GID options to pre-set the ownership of the mountpoint.
See mount.cifs(8)

Theo

It works, its amazing how much that helped out. I had trying to figure that one out for a while and just couldn’t. I’m still a little use to windows, but I am trying to learn Linux.