Suppose I boot a Linux machine without GUI. When it displays a tty login prompt, can I shutdown the machine with a keyboard sequence?
Of course I could type in my username and password and then sudo shutdown -h now
; however, is it possible to shut it down before the login using a keyboard shortcut?
Best Answer
I've done this before with a user named "
s
" and no password.IIRC you set the user's shell to
/sbin/shutdown
. Prolly need to add it to/etc/shells
.