View Full Version : Auto mount a partition as a normal user

30th September 2005, 07:29 AM
I want to mount a vfat partition automatically when I log in as a normal user (i.e. not root).

I've included the follwing line in the fstab:
/dev/hda6 /mnt/D vfat rw,user,noauto 0 0

Note: "noauto" because otherwise it would mount the partition automatically as root, and any other users won't be able to write to the partition (unless I unmount and remount as a user).

I'm looking for a config file or similar to include a line:
mount /dev/hda6 (as normal user).
Will it be inside "bash_profile" or somewhere else?
I'm quite clueless about this :confused:

30th September 2005, 08:20 AM
Well, I deleted this because none of the sample on this site are correct.

But you use -o rw -t vfat resync,users,umak=0777 0 0

So, something like this
mkdir /media/winfat
mount /dev/hda6 -o rw -t vfat resync,users,umak=0777 0 0 /media/winfat


30th September 2005, 08:56 AM
Ajust 0777 to the value needed according to usage
Note: resync may shorten the life of the disk.


1st October 2005, 04:04 PM
It went well when I added the option "noauto". I don't know why since noauto shouldn't mount the partition automatically, but it apparently does in my case. Now my options are like -- rw,users,noauto.