Skip to main content
added information
Source Link
Reputet
  • 105
  • 1
  • 5

There is a setuid bit on the file.

user@host:~$ ls -l /bin/mount
-rwsr-xr-x 1 root root 40152 May 26 19:31 /bin/mount

Why does operating system require root access to execute the 'mount'?

user@host:~$ /bin/mount /dev/sdb1 /mnt
mount: only root can do that
user@host:~$ sudo /bin/mount /dev/sdb1 /mnt
user@host:~$ lsblk  | grep sdb

sdb      8:16   0  102M  0 disk
└─sdb1   8:17   0  101M  0 part /mnt

My /etc/fstab

# / was on /dev/sda1 during installation
UUID=026bb2d9-1c0c-4163-85a1-f83b2221eb34 /               ext4    errors=remount-ro 0       1

# swap was on /dev/sda5 during installation
UUID=aec6b039-13b1-4568-abb1-2be1f3429325 none            swap    sw              0       0

There is a setuid bit on the file.

user@host:~$ ls -l /bin/mount
-rwsr-xr-x 1 root root 40152 May 26 19:31 /bin/mount

Why does operating system require root access to execute the 'mount'?

user@host:~$ /bin/mount /dev/sdb1 /mnt
mount: only root can do that
user@host:~$ sudo /bin/mount /dev/sdb1 /mnt
user@host:~$ lsblk  | grep sdb

sdb      8:16   0  102M  0 disk
└─sdb1   8:17   0  101M  0 part /mnt

There is a setuid bit on the file.

user@host:~$ ls -l /bin/mount
-rwsr-xr-x 1 root root 40152 May 26 19:31 /bin/mount

Why does operating system require root access to execute the 'mount'?

user@host:~$ /bin/mount /dev/sdb1 /mnt
mount: only root can do that
user@host:~$ sudo /bin/mount /dev/sdb1 /mnt
user@host:~$ lsblk  | grep sdb

sdb      8:16   0  102M  0 disk
└─sdb1   8:17   0  101M  0 part /mnt

My /etc/fstab

# / was on /dev/sda1 during installation
UUID=026bb2d9-1c0c-4163-85a1-f83b2221eb34 /               ext4    errors=remount-ro 0       1

# swap was on /dev/sda5 during installation
UUID=aec6b039-13b1-4568-abb1-2be1f3429325 none            swap    sw              0       0
fixed grammar
Source Link
Reputet
  • 105
  • 1
  • 5

There is a setuid bit on the file.

user@host:~$ ls -l /bin/mount
-rwsr-xr-x 1 root root 40152 May 26 19:31 /bin/mount

Why does operating system require a root access to execute the 'mount'?

user@host:~$ /bin/mount /dev/sdb1 /mnt
mount: only root can do that
user@host:~$ sudo /bin/mount /dev/sdb1 /mnt
user@host:~$ lsblk  | grep sdb

sdb      8:16   0  102M  0 disk
└─sdb1   8:17   0  101M  0 part /mnt

There is a setuid bit on the file.

user@host:~$ ls -l /bin/mount
-rwsr-xr-x 1 root root 40152 May 26 19:31 /bin/mount

Why does operating system require a root access to execute the 'mount'?

user@host:~$ /bin/mount /dev/sdb1 /mnt
mount: only root can do that
user@host:~$ sudo /bin/mount /dev/sdb1 /mnt
user@host:~$ lsblk  | grep sdb

sdb      8:16   0  102M  0 disk
└─sdb1   8:17   0  101M  0 part /mnt

There is a setuid bit on the file.

user@host:~$ ls -l /bin/mount
-rwsr-xr-x 1 root root 40152 May 26 19:31 /bin/mount

Why does operating system require root access to execute the 'mount'?

user@host:~$ /bin/mount /dev/sdb1 /mnt
mount: only root can do that
user@host:~$ sudo /bin/mount /dev/sdb1 /mnt
user@host:~$ lsblk  | grep sdb

sdb      8:16   0  102M  0 disk
└─sdb1   8:17   0  101M  0 part /mnt
Source Link
Reputet
  • 105
  • 1
  • 5

Why doesn't setuid work with mount?

There is a setuid bit on the file.

user@host:~$ ls -l /bin/mount
-rwsr-xr-x 1 root root 40152 May 26 19:31 /bin/mount

Why does operating system require a root access to execute the 'mount'?

user@host:~$ /bin/mount /dev/sdb1 /mnt
mount: only root can do that
user@host:~$ sudo /bin/mount /dev/sdb1 /mnt
user@host:~$ lsblk  | grep sdb

sdb      8:16   0  102M  0 disk
└─sdb1   8:17   0  101M  0 part /mnt