I’ve recently been learning a little bit about Linux security and I want to model some stuff on my own computer (ubuntu) and I’ve been wondering…does anyone know if or how you can read the /etc/shadow file without needing admin privileges
(perhaps a boot disk or something?) Thanks in advance.
If you are sitting at the machine the easiest mechanism is to modify the kernel command line at bootup to include
init=/bin/sh. This will run the shell instead of the usual SysVinitorupstartorsystemdsystem boot up procedure, and the shell will give you access to anything you like, no questions asked.This is why it is important to set a password on your grub configuration (
info grub -s security). The bootdisk option you suggest is a reason why it is important to set a BIOS password on your machine. And removing the hard drive is a reason why it is best to put your machine in a heavy, locked, cabinet that can provide you with the level of security you wish.