Edit
Now I'm sure
I wasn't doning anything wrong
I understood that I could set oartitions from settings > removable storage > removable devices to be mounted automatically or not
this is sessin based and not startup based
Now the only proplem is to give mount ablity of ntfs to non sudoer user without a sudoer user password
users within plugdev group are able to mount ext4 and fat without sudoer password but not ntfs, user must provide a password of a superuser and we are creating these users for not to provide system adminstraion for other users
Original question
System
- UbuntuStudio
- 22.04
- Plasma-desktop
problem
I have 4 users [manager, worker, renter, guest]
I tried to manage these resources [root fn, app install, printers, storage, web]
- Manager is the default user added while installation
- Worker should not have access to [root functions, app install]
- Renter should only have access to [printers, storage, web]
- Renter should only have access to [web]
Every thing goes well using groups exept storage mount:
- ntfs : don't mount unless user provide a sudoer user
- fat,ext : mounts automatically on user login exept
manager that has it with the configured behavior [only mount when prompted]
what I tried
I created a new group for mounting data
sudo groupadd mnt-grp;
I got the new group gid and nobody user uid
getent group | grep mnt-grp;
# mnt-grp:x:xxxx ...
getent passwd | grep nobody;
# nobody:x:yyyyy: ...
added every user to this group and plugdev one as needed
sudo usermod -aG plugdev $USER;
sudo usermod -aG mnt-grp $USER;
changed the fstab to be like this
UUID=[ext-uuid] /mnt/[mnt-point] ext4 x-gvfs-show,nosuid,nodev,nofail,users,user=nobody,gid=[xxxx] 0 0
UUID=[fat-uuid] /mnt/[mnt-point] auto x-gvfs-show,nosuid,nodev,nofail,noauto,users,uid=[yyyyy],gid=[xxxxx] 0 0
UUID=[ntfs-uuid] /mnt/[mnt-point] auto nosuid,nodev,nofail,x-gvfs-show,noauto 0 0
uid,gid,user,user=xxx,users makes error on mount
changed the own of /mnt/ and all its members to nobody:mnt-grp
sudo chown -R nobody:mnt-grp .;
setiuation
- I need to reduce splash screen time by stopping mount unless requested,
- only a perimted users (
plugdev members) could mount
- and only specified users (
mnt-grp member) could have access
every plugdev member is added as part of mnt-grp
drives is needed as ntfs and format is not an option
- I need to know at least what I'm doing wrong