#!/bin/bash # # Here you can add your own stuff, that should be done for every user who # was new created. # # When you create a user with useradd, this script will be called # with the login name as parameter. Optional, UID, GID and the HOME # directory are added. # # Check for the required argument. if [ $# -lt 1 -o $# -gt 4 ]; then echo Usage: $0 username [uid gid home] exit 1 fi # Update NIS database # make -C /var/yp # All done. exit 0