2

I have a Server running on desktop, since my aunt that lives with me is taking classes for MS office it is currently booting XP, so i have setup sharing of all my drives so i can access my files

but how can i auto mount those drives at boot and also with help of script? i need the script cause I'm often messing around on laptop and tend to loose connectivity so the scripts need to unmount and den remount, sort of like a referesh.

I have no user id or pass setup on Windows and the drives NTFS permission is set to allow everyone.

how do i achieve what i need?

PS: i managed to create a script but it asks for password every time it mounts a share!!!

1 Answer 1

1

The best way to do this is to create an entry in your /etc/fstab. This is the file that handles automatically mounting drives. If you have no credentials set and don't care about security, you would need to add a line like this:

//fileservername/path  /media/fileshare  cifs  username=guest,iocharset=utf8,file_mode=0777,dir_mode=0777,nobootwait   0   0

Replace fileservername/path with the hostname (or IP address) of the PC that is sharing the files, and the share name. /media/fileshare is where you want to mount the share locally. This directory must already exist. When you need to re-mount this drive, say after a connection loss, etc. use the following:

sudo mount -a

That will attempt to remount any filesystems mentioned in fstab.

2
  • thanks! but i ended up using gigolo and running that app on startup but m always glad to know other alternatives Sep 21, 2012 at 23:37
  • hey this method is not working, I have asked my question here: askubuntu.com/q/696341/294611
    – Alex Jones
    Nov 10, 2015 at 17:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .