How do I prevent manuel mounting of all the partitions?

Non release banter
mucahit
White ninja
White ninja
Posts: 4
Joined: 17 Jun 2013, 15:46
Distribution: Internet
Location: Turkey

How do I prevent manuel mounting of all the partitions?

Post#1 by mucahit » 03 Jul 2013, 09:04

Hi everyone,
How do I prevent manuel mounting of all the partitions?

donald
Full of knowledge
Full of knowledge
Posts: 2067
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Re: How do I prevent manuel mounting of all the partitions?

Post#2 by donald » 04 Jul 2013, 00:09

If I remember correctly only root is able to mount/umount
So if the normal user don't know the root-passwort he can't do it.

(make you root, unmount your partitions and than change back to normal
user.....and don't tell him/her the root-password) :)

User avatar
francois
Contributor
Contributor
Posts: 6435
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: How do I prevent manuel mounting of all the partitions?

Post#3 by francois » 04 Jul 2013, 10:06

Mounting of partitions at bootup is done thru the file: /etc/fstab:
http://en.wikipedia.org/wiki/Fstab
An example here is:

Code: Select all

# System mounts
aufs / aufs defaults 0 0 # AutoUpdate
proc /proc proc defaults 0 0 # AutoUpdate
sysfs /sys sysfs defaults 0 0 # AutoUpdate

# Device partitions
/dev/sda1 /mnt/sda1 ext4 auto,noatime,users,suid,dev,exec 0 0 # AutoUpdate
/dev/sda3 /mnt/sda3 ext3 auto,noatime,users,suid,dev,exec 0 0 # AutoUpdate
/dev/sda5 /mnt/sda5 ext3 auto,noatime,users,suid,dev,exec 0 0 # AutoUpdate
/dev/sda6 /mnt/sda6 ext3 auto,noatime,users,suid,dev,exec 0 0 # AutoUpdate

# Swap partitions
/dev/sda4 none swap auto,sw,pri=1 0 0 # AutoUpdate
Prendre son temps, profiter de celui qui passe.

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: How do I prevent manuel mounting of all the partitions?

Post#4 by brokenman » 04 Jul 2013, 13:45

How do I prevent manuel mounting of all the partitions?
We basically need more information:
Manual mounting for root or guest or everybody?
What is the end goal of this?
Mounting at boot time or after or both?

There are various ways to achieve this but the best depends on your situation and why you need it. For example you could boot with noauto cheat code and then remove/move the mount command using a boot script. That should stop anybody from mounting.
How do i become super user?
Wear your underpants on the outside and put on a cape.

Post Reply