Como verificar se o arquivo fstab está correto sem o sudo?

1

Eu atualizei de atrevido para truculento.
Depois disso, usando sudo segfaulted:

fkalter@London ~> sudo whoami
    [sudo] password for fkalter:
    YubiKey for 'fkalter':
    [1]    16961 segmentation fault (core dumped)  sudo whoami

Então, quando tentei executar o strace para obter mais algumas informações, isso apareceu na saída:

sudo: effective uid is not 0, is"..., 140sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?

Meu /etc/fstab neste momento é o seguinte:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system>                             <mount point>   <type>  <options>                                   <dump>  <pass>
proc                                        /proc           proc    nodev,noexec,nosuid                         0       0
UUID=1afaad96-8aa3-4283-95a4-20510e5b3fbb   /               ext4    rw,async,exec,nouser,suid,errors=remount-ro 0       1
#UUID=1afaad96-8aa3-4283-95a4-20510e5b3fbb  /               ext4    defaults                                    0       1
UUID=46605028-51e4-4676-b621-2d8fbab185d5   /boot           ext4    defaults                                    0       2
UUID=8f6af894-fc4a-4a81-b1f7-20c42ef35fe0   /home           ext4    defaults                                    0       2

Para verificar como meu sistema de arquivos raiz foi montado, executei mount sem argumentos:

fkalter@London ~> mount
    /dev/sda6 on / type ext4 (rw)
    proc on /proc type proc (rw,noexec,nosuid,nodev)
    sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
    none on /sys/fs/cgroup type tmpfs (rw)
    none on /sys/fs/fuse/connections type fusectl (rw)
    none on /sys/kernel/debug type debugfs (rw)
    none on /sys/kernel/security type securityfs (rw)
    udev on /dev type devtmpfs (rw,mode=0755)
    devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
    tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
    none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
    none on /run/shm type tmpfs (rw,nosuid,nodev)
    none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
    none on /sys/fs/pstore type pstore (rw)
    cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,relatime,cpuset)
    cgroup on /sys/fs/cgroup/cpu type cgroup (rw,relatime,cpu,release_agent=/run/cgmanager/agents/cgm-release-agent.cpu)
    cgroup on /sys/fs/cgroup/cpuacct type cgroup (rw,relatime,cpuacct,release_agent=/run/cgmanager/agents/cgm-release-agent.cpuacct)
    cgroup on /sys/fs/cgroup/memory type cgroup (rw,relatime,memory,release_agent=/run/cgmanager/agents/cgm-release-agent.memory)
    cgroup on /sys/fs/cgroup/devices type cgroup (rw,relatime,devices,release_agent=/run/cgmanager/agents/cgm-release-agent.devices)
    cgroup on /sys/fs/cgroup/freezer type cgroup (rw,relatime,freezer,release_agent=/run/cgmanager/agents/cgm-release-agent.freezer)
    cgroup on /sys/fs/cgroup/blkio type cgroup (rw,relatime,blkio,release_agent=/run/cgmanager/agents/cgm-release-agent.blkio)
    cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,relatime,perf_event,release_agent=/run/cgmanager/agents/cgm-release-agent.perf_event)
    cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,relatime,hugetlb,release_agent=/run/cgmanager/agents/cgm-release-agent.hugetlb)
    /dev/sdf1 on /mnt/secret type ext4 (rw)
    /dev/sda1 on /boot type ext4 (rw)
    /dev/sda5 on /home type ext4 (rw)
    binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
    systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
    /home/fkalter/.Private on /home/fkalter type ecryptfs (ecryptfs_check_dev_ruid,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs,ecryptfs_sig=153b19c1d2ccc61f,ecryptfs_fnek_sig=03fd342dfcc3e207)
    gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=fkalter)

A primeira linha mostra que as únicas opções são rw (leitura / gravação). Nenhum suid ou qualquer outra opção especificada no fstab. Para ver o que acontece durante o processo de inicialização, aqui está a saída do dmesg.

fkalter@London ~> dmesg | grep mount
    [    4.445090] EXT4-fs (sda6): mounted filesystem with ordered data mode. Opts: (null)
    [    7.767086] EXT4-fs (sda6): re-mounted. Opts: (null)
    [    7.833123] EXT4-fs (sdf1): mounted filesystem with ordered data mode. Opts: (null)
    [    7.842508] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
    [    7.855840] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)

Que também não mostra opções de montagem se eu intrepid isso corretamente.

Eu suspeito que há algo errado com o meu arquivo fstab (permissões, erros de digitação, etc). Quando googling, a única resposta parece ser sudo mount -a . Finalmente minha pergunta é essa. Como posso verificar isso sem sudo?

    
por Freek Kalter 23.07.2014 / 14:29

0 respostas