Slogin is a login program to be used in single-user mode. It
prompts the user:
root password (or ^D to log in as a user):
and waits for input.
If the user supplies the root password, slogin immediately
initiates a root login session. Otherwise, if the user presses
Control-D, the program prompts for user name and password and
initiates a non-superuser session, provided that the supplied credentials are
correct.
In both cases slogin does not try to write any files, in
particular, it does not modify /var/log/utmp and
/var/log/wtmp. This makes it useful in start-up scripts
when the root maintenance is necessary, escpecially when the partition
containing these files is not mounted (e.g. fsck failed).
The usual startup sequence is:
/sbin/fsck -A
RC=$?
if [ $RC -ge 4 ]; then
echo "***********************************"
echo "*** ERROR CHECKING FILESYSTEMS. ***"
echo "*** SYSTEM NEEDS MAINTENANCE. ***"
echo "***********************************"
slogin
elif [ $RC -ge 2 ]; then
echo "***********************************"
echo "*** The filesystem was changed. ***"
echo "*** The system will now reboot. ***"
echo "***********************************"
umount -a -r
reboot -f
fi
The project's homepage at Puszcza contains latest news and patches for the project.
Stable releases are available from download.gnu.org.ua. Latest stable release is slogin-0.1.tar.gz.
Return to Sergey Poznyakoff home page.
Return to the Puszcza home page.
Please send broken links and other corrections (or suggestions) to webmaster at gnu dot org dot ua.
Copyright (C) 2005 Sergey Poznyakoff
Verbatim copying and distribution of this entire article is
permitted in any medium, provided this notice is preserved.
Updated: $Date: 2007/07/04 13:38:45 $ $Author: gray $