{"id":61852,"date":"2023-12-25T14:35:23","date_gmt":"2023-12-25T13:35:23","guid":{"rendered":"https:\/\/ekiwi-blog.de\/61852\/blocking-linux-script-prevents-login\/"},"modified":"2024-01-01T16:42:30","modified_gmt":"2024-01-01T15:42:30","slug":"blocking-linux-script-prevents-login","status":"publish","type":"post","link":"https:\/\/ekiwi-blog.de\/en\/61852\/blocking-linux-script-prevents-login\/","title":{"rendered":"Blocking Linux script prevents login"},"content":{"rendered":"<p>Blocking script prevents login in Linux.<\/p>\n<p><!--more--><\/p>\n<p>In our article &#8220;<a href=\"https:\/\/ekiwi-blog.de\/27028\/linux-script-beim-login-ausfuehren\/\">Linux: Execute script at login<\/a>&#8221; we showed how we can execute a script at login\/system startup.<\/p>\n<p><iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/YaGKKS34bhY?si=-7gjTleP1tSLGTjI\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/p>\n<p>It is important here that the script does not &#8220;block&#8221;, i.e. get stuck. Otherwise, a black screen awaits us at the next start and login is no longer possible.<\/p>\n<p>Here is an example, here we <a href=\"https:\/\/ekiwi-blog.de\/25801\/onedrive-zugriff-in-linux-einbinden-mit-rclone\/\">mount OneDrive in Linux<\/a>. The script blocks unless we insert a &#8220;&amp;&#8221; at the end.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/12\/lock_1.png\" alt=\"\" width=\"695\" height=\"181\" class=\"aligncenter size-full wp-image-61840\" srcset=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/12\/lock_1.png 695w, https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/12\/lock_1-300x78.png 300w\" sizes=\"auto, (max-width: 695px) 100vw, 695px\" \/><\/p>\n<p>But what to do when the child has fallen into the well? In this case, we can use the following key combination to access the console.<\/p>\n<p><kbd>STRG<\/kbd> + <kbd>ALT<\/kbd> + <kbd>F1<\/kbd><\/p>\n<p>We can then log in.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/12\/lock_2.png\" alt=\"\" width=\"1013\" height=\"142\" class=\"aligncenter size-full wp-image-61844\" srcset=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/12\/lock_2.png 1013w, https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/12\/lock_2-300x42.png 300w, https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/12\/lock_2-768x108.png 768w\" sizes=\"auto, (max-width: 1013px) 100vw, 1013px\" \/><\/p>\n<p>And edit the login script and remove or customise the command.<\/p>\n<pre>\r\nvim ~\/.profile\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/12\/lock_3.png\" alt=\"\" width=\"363\" height=\"129\" class=\"aligncenter size-full wp-image-61848\" srcset=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/12\/lock_3.png 363w, https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/12\/lock_3-300x107.png 300w\" sizes=\"auto, (max-width: 363px) 100vw, 363px\" \/><\/p>","protected":false},"excerpt":{"rendered":"<p>Blocking script prevents login in Linux.<\/p>\n","protected":false},"author":1,"featured_media":18426,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1555],"tags":[2443],"class_list":["post-61852","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-en","tag-linux-en-2"],"_links":{"self":[{"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/posts\/61852","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/comments?post=61852"}],"version-history":[{"count":0,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/posts\/61852\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/media\/18426"}],"wp:attachment":[{"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/media?parent=61852"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/categories?post=61852"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/tags?post=61852"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}