On 2025-07-05, Javier Martinez wrote: > El 5/7/25 a las 1:46, Nuno Silva escribió: >> On 2025-07-04, Javier Martinez wrote: >> >>> El 4/7/25 a las 19:58, whiteman808 escribió: >>>> Hello, >>>> >>>> I have a possibly stupid question motivated by curiosity. Is it >>>> possible to gain access to root account, or maybe at least have an >>>> access to regular user console, or even unlock desktop session >>>> without knowing password of root or regular user's password? How >>>> this can be done? I'm talking about computer not having any remote >>>> services like ssh exposed, even in lan >>>> >>>> What should I do if for example I forgot hypothetically luks >>>> encryption password but still have computer powered on and locked >>>> gnome or kde session? >>>> >>>> What in case if PC doesn't have enabled magic sysrq? >>>> >>>> Just asking because I'm curious, not because I have problem described >>>> above >>>> >>>> Thank you, >>>> whiteman808. >>> >>> >>> ctrl+alt+backspace can give you terminal access if you locked your X >>> windows and it had not been started from a display manager (so started >>> with startx) >> >> Unless you've locked it with vlock, I suppose? >> >> (vlock -na) >> > > IMHO vlock can't lock standard tty. > > I want mean, vlock can lock all xterms you have opened for example, > not the login session opened at tty2
I think the Linux virtual consoles might be precisely what vlock is intended to lock, or at least its online manual features the expression "virtual console" and suggests that focus/purpose. It will also work on standard terminals (say, something from DEC on ttyS0) and on terminal emulators like xterm. With the X session itself, it works by instead creating an additional virtual console to switch to. -- Nuno Silva