1

i've seen this answer, but it requires the partition to always be mounted (and do the user access via group perms on the root FS that mounted the NTFS)

What i'm hopping to be possible, is to allow only a couple users to initiate the mount of the partition.

I will rarely have need to mount that partition, and leaving it mounted all the time is just asking for trouble on a portable that will be sleeping/waking/and moving a lot.

is it possible? something like:

fstab:

/dev/sda1 /windows ntfs noauto,user=userA,user=userB,rw 0 0

And ideally, requiring the user the type in the password to confirm. I have no idea what happens on the gui land... but trying to learn. if this was a regular server, i'd simply add them to sudoers with that mount point allowed.

I think ultimately i will just make them 2 administrators of the machine. But i wanted to avoid that.

gcb
  • 262

1 Answers1

1

In fstab you can also use

uid=1000,gid=1000,permissions 0 2

to specify a user, group and permissions to make the mount more specific. If you put those 2 users in a new group and use that ID during the mount they own the disc and can write to it.

But ...

I would not mount the disc automatically at all and mount it only when those 2 users log into the system. Basically when those users log in, start a script that mounts the disc. If you still want a password you can enforce that in the script and if you add in a configuration file you could put the user names in there (so it is easy to add new or remove obsolete users).

Rinzwind
  • 309,379