sulogin -- Single-user login
The user is prompted
sulogin will be connected to the current terminal, or to the optional device that can be specified on the command line (typically /dev/console).
If the -p flag was set, the single-user shell will be invoked with a dash as the first character in argv[0]. That will cause most shells to behave as a login shell. The default is not to do this, so that the shell will not read /etc/profile or $HOME/.profile at startup.
After the user exits the single-user shell, or presses control-d at the prompt, the system will (continue to) boot to the default runlevel.
This is very valuable together with the -b flag to init. To boot the system into single user mode, with the root file system mounted read/write, using a special "failsafe" shell that is statically linked (this example is valid for the LILO bootprompt)
boot: linux -b rw sushell=/sbin/sash
/etc/passwd,
/etc/shadow (if present)
If they are damaged or non-existant, sulogin will start a root shell without asking for a password. Only use the -e option if you are sure the console is physically protected against unauthorized access.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |