Putting "login root" in /.profile: a bad idea

Larry Wake lkw at csun.edu
Tue Dec 20 20:27:52 AEST 1988


Putting "login root" in your /.profile file is definitely a Bad Thing.
The problem: login will time out after 60 seconds, and your system will
come up multiuser.  Why is this bad?  Scenario: two in the morning, a
momentary power failure causes your system to crash hard.  One of your
filesystems goes sour enough that fsck gives up; system goes single user.
Your /.profile runs login, but no one's around to log in.  A minute later,
your system comes up multiuser -- with a dirty filesystem, and no record
anywhere that this is what happened, as the fsck error message will
probably have scrolled off your console by the time you get there...

After this happened to us, I cobbled together a program called 'lockpass'
that just prompts for the root password forever, and execs a shell once it
gets it.  I believe someone posted a similar program to Sun-Spots a few
months ago.

Larry Wake
CSU Northridge Computer Center
lkw at csun.edu



More information about the Comp.sys.sun mailing list