0

How to create a user in Linux that user can only use a text editor. And if that user exit from the text editor the system automatically shut down

  • This isn't a Linux support (QA) site (SE Unix & Linux fills that function; https://askubuntu.com/help/on-topic) but you could have the login script automatically start an editor, then shutdown, possibly mark an editor as the shell for a user (may limit what editors can be used).. etc but why ask here? your question as written would be better suited elsewhere. – guiverc Mar 27 '21 at 10:58
  • 1
    The very fact which that user can use a text editor, means it can write/edit/view some files. You should probably come up with another solution to what you want to do; e.g creating an application or so... – Shayan Mar 27 '21 at 11:08
  • You cannot. Editors all have "shell escapes" (:!), file selection (../../../etc/passwd), are subject to attack via signals handled by the parent process. – waltinator Mar 27 '21 at 17:35

0 Answers0