[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: No sudo, no root, on a fully encrypted LVM filesystem



In <[🔎] AANLkTi=90ouiMb6Wk_OEeij7EhAkXmraMp8+Z2wieuOt@mail.gmail.com>, David 
Starner wrote:
>I've managed to remove suid bits from all the files in my /usr/bin
>directory. As I have no root password, and I have a fully encrypted
>LVM filesystem, I'm at loss at how to recover them without deleting
>everything and starting all over.

If the root account is disabled properly (probably the case; "*" or 
something starting with "!" in the password field in /etc/shadow), then 
using the single-user mode option should mount up all your file systems 
and give you a root shell (on the local console) without prompting for a 
password.[1]

Debian GRUB scripts should already provide an single-user menu entry.  
If you are using GRUB, but do not have an entry, use the menu system to 
append "single" (and, optionally remove "quiet") from the kernel 
command-line.  If you are not using GRUB, you may be able to do 
something similar, but I'm not familiar with any other boot loaders.

Things might still be a little "off" since there could be some programs 
automatically started that drop root privileges and then need a suid in 
/usr/bin to do something that requires elevated permissions.  Still, 
from your root shell you should be able to fix things and reboot into 
full multi-user mode.

[1] If root has a password, even one that can't legitimately be typed 
from the local console, you get a root password prompt instead. :(
-- 
Boyd Stephen Smith Jr.                   ,= ,-_-. =.
bss@iguanasuicide.net                   ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy         `-'(. .)`-'
http://iguanasuicide.net/                    \_/

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: