You did not say whether you had other software installed which is automounting all drives. My solution below assumes that you don't. If you do, then your problem is different: you should specify what it is so that someone can suggest how to either uninstall it or control it.
Here is an example of udev rules to mount only allowed drives (not tested but based on similar rules that I use):
#-- Skip if not an appropriate "sd" device
KERNEL!="sd[b-z]*", GOTO="99_exit"
SUBSYSTEM!="block", GOTO="99_exit"
#-- Handle 'remove' and 'change' events
SUBSYSTEMS=="usb", ACTION=="remove", RUN+="/usr/bin/pumount /dev/%k", GOTO="99_exit"
ACTION=="remove|change", GOTO="99_exit"
#-- Create useful environment variables
SUBSYSTEMS=="usb", ENV{ID_SERIAL}!="?*", IMPORT{builtin}="usb_id"
SUBSYSTEMS=="usb", ENV{ID_FS_LABEL}!="?*", IMPORT{program}="/sbin/blkid -o udev -p %N"
#-- Skip if this is not a filesystem (e.g. if this is the whole drive, not a formatted partition)
ENV{ID_FS_USAGE}!="filesystem", GOTO="99_exit"
#-- Mount only allowed drives:
SUBSYSTEMS=="usb", ACTION=="add", ENV{ID_FS_LABEL}=="something_allowed", RUN+="/usr/bin/sudo -u someuser /usr/bin/pmount -t vfat /dev/%k /media/some_name"
SUBSYSTEMS=="usb", ACTION=="add", ENV{ID_FS_LABEL}=="other_allowed", RUN+="/usr/bin/sudo -u someuser /usr/bin/pmount -t vfat /dev/%k /media/other_name"
#-- Exit
LABEL="99_exit"
The mounting command that you use is, of course, up to your preference. The one that I showed is only an example.
UPDATE: I gather from your comments that you do have something installed that does automounting. On my system (Debian Wheezy), I don't. I tried the grep you suggested and got a different result. In /lib/udev/rules.d/80-udisks.rules
, I found this section of code:
# Mark devices that shouldn't be automounted / autoassembled etc.
#
# Deny all, then punch holes for what looks like physical drives
# (TODO: this heuristic might need some work)
#
ENV{UDISKS_PRESENTATION_NOPOLICY}="1"
KERNEL=="sd*|hd*|sr*|mmcblk*|mspblk*", ENV{DISKS_PRESENTATION_NOPOLICY}="0"
This suggests that, if I had automounting software installed, it could be controlled by the UDISKS_PRESENTATION_NOPOLICY environment variable. You have not specified your distribution but it is apparently different.