From 9244bc008dfb70fb89dbb6e42ea788ff9854e286 Mon Sep 17 00:00:00 2001 From: mo khan Date: Sun, 29 Sep 2019 20:02:25 -0600 Subject: Try to boot into single user mode --- README.md | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/README.md b/README.md index 7e1a621..e382e0a 100644 --- a/README.md +++ b/README.md @@ -909,6 +909,85 @@ Your report should include advice to other people attempting to do the same. graphical.target ``` + To change the run level for a running system to single user mode, I need to change the run level to 1. + + ```bash + モ systemctl isolate rescue.target + ``` + + After running the above command the GUI's dissappeared and it looked like my + system was reboot. A single shell was shown with the following output: + + ```bash + Fedora 30 (Workstation Edition) + Kernel 5.2.13-200.fc30.x86_64 on an x86_64 (tty2) + + localhost login: mokha + Password: + System is going down. Unprivileged users are not permitted to log in anymore. For technical details, see pam_nologin(8). + + Authentication failure + ``` + + The man page for `pam_nologin` says: + + + ```bash + DESCRIPTION + pam_nologin is a PAM module that prevents users from logging into the system when /var/run/nologin or + /etc/nologin exists. The contents of the file are displayed to the user. The pam_nologin module has no + effect on the root user's ability to log in. + ``` + + So I tried to enable logins for the root user. + + ```bash + モ sudo -i + [sudo] password for mokha: + [root@localhost ~]# whoami + root + [root@localhost ~]# passwd + Changing password for user root. + New password: + Retype new password: + passwd: all authentication tokens updated successfully. + ``` + + Then I tried to change the run level again. This time it would return me to + the graphical login prompt. + + Next, I tried to look at the help for `init`. + + ```bash + モ init --help + init [OPTIONS...] {COMMAND} + + Send control commands to the init daemon. + + --help Show this help + --no-wall Don't send wall message before halt/power-off/reboot + + Commands: + 0 Power-off the machine + 6 Reboot the machine + 2, 3, 4, 5 Start runlevelX.target unit + 1, s, S Enter rescue mode + q, Q Reload init daemon configuration + u, U Reexecute init daemon + + See the telinit(8) man page for details. + ``` + + I decided to try using `init` to set the run level to recue mode. + + ```bash + モ init 1 + ``` + + This produced the same affect as earlier. So I was not able to switch into + single user mode from Fedora. + + b. What’s difference between single-user mode and how the system normally runs? > Single-user mode is a mode where only the administrator (root) has access to the computer, the mode is designed for maintenance and is often used for repairs. - https://www.tldp.org/LDP/GNU-Linux-Tools-Summary/html/x5152.htm -- cgit v1.2.3