Novell Home

Create Home Directories for NDS for Solaris Users

Novell Cool Solutions: Tip
By Subbu K.K.

Digg This - Slashdot This

Posted: 8 Jul 1999
 

You've got more users than you want to count on Solaris machines, and they all need home directories. If you had to create these directories one by one, it would be an arduous task to say the least, but you don't have to do this by hand. Here's a simple way to exploit the fact that the login shell will fall back to using "/" as the home directory: Just slip in a startup script that checks for and creates home directories (say /home/$USER) on the fly. Simple as that. Here's how you do it:

  1. Write a setuid root script that will create the home directory (/home/$USER).
  2. Invoke this script from /.profile (for bash,ksh and sh) or /.cshrc (csh).

If the home directory is missing, the login shell defaults to "/", and executes the startup scripts from this directory.

This procedure is cool because it creates a home directory when the user logs in for the first time on a host. So, give it a try.


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell