home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Utilities / defaultuser / defaultuser.README next >
Encoding:
Text File  |  1997-12-14  |  2.2 KB  |  57 lines

  1.  
  2. Date:         13 Sept 1997
  3. Author:     TjL <luomat+next@luomat.peak.org>
  4. Version:     2.0 (previously released as `fiddlepass'
  5.  
  6. Tired of having to login everytime you reboot?
  7.  
  8. Ever wish your NeXT would just boot right into your own account (or some account)?
  9.  
  10. Well, if so, this script is for you.
  11.  
  12. You may be familiar with the ``me'' account.  When you first install NeXTStep or OpenStep, it
  13. will boot into the ``me'' account.  That's fine if you never connect to the 'net or a LAN
  14. where having an account with no password is a very bad thing.
  15.  
  16. This script, however, uses a little-known dwrite called the ``DefaultUser'' in root's
  17. preferences for ``loginwindow''.
  18.  
  19. Assume that your username is ``myaccount''.  Login as root, launch Terminal.app and enter:
  20.  
  21.     dwrite loginwindow DefaultUser myaccount
  22.  
  23. You can then use this script.  It is very simple.  When you want to remove the password for
  24. the DefaultUser account, you simply enter:
  25.  
  26.     defaultuser.sh removepass
  27.  
  28. You must do this as root, of course.
  29.  
  30. To bring the password back, use
  31.  
  32.     defaultuser.sh restorepass
  33.  
  34. To make it even simpler, I might try something like this in /etc/rc.local:
  35.  
  36. if [ -x /usr/local/bin/defaultuser.sh ]; then
  37.     /usr/local/bin/defaultuser.sh removepass
  38.     (sleep 60 && /usr/local/bin/defaultuser.sh restorepass) &
  39. fi    
  40.  
  41. Note: this assumes you have put this script at /usr/local/bin/defaultuser.sh, of course!
  42.  
  43. That will remove the password, wait 60 seconds, and then restore the password.  That should be
  44. plenty of time to complete the boot action and have the DefaultUser get logged in.  However,
  45. you might want to make it less time since this account will be open during that interval.
  46.  
  47. WARNING: this script removes a password from a user account on your machine, and it mucks with
  48. NetInfo.  If that isn't enough for you to treat it with a lot of care, then you're very
  49. foolish.  Be careful.  I can't be held responsible for what it does to you or your system.
  50.  
  51. NOTE: Don't use ``root'' as the DefaultUser.... it's just a bad idea.  You don't ever want
  52. root to not have a password, even for just a few minutes.  Remember, if someone comes in and
  53. reboots the machine, they will be able to get into the DefaultUser account.  Convenience comes
  54. with a price.
  55.  
  56.  
  57.