Profile unix updating user

Two sample scripts have been created that demonstrate how an administrator can extract the current list of NIS users into a simple text file and then use that text file to create the users in the Windows environment.The script names are “getusers.ksh” and “makeusers.ksh” respectively.This allows it to be modified to meet the needs of your specific environment.One easy change would be to use the script to extract a list of users from /etc/passwd instead of the NIS database.As a demonstration script, extracts only two fields, though it can be modified to extract additional fields if required.The script has the following syntax: [-dh] [-f filespec] [–g n][–G n] [–u n] [–U n] The options supported are: The script uses the Korn shell support for functions to divide the script into discrete and self-contained elements.By default, this means it must be run in the context of a user who is a member of the Domain Admins group.

The creation of Windows users to match your existing NIS infrastructure would be a tedious and painful process in any organization with more than a few dozen users.The scripts are written to run in the Korn shell environment.They use features of the Korn shell that will require modification to run in another shell, such as the bash shell.Place the script in the location of your choice, and place the output file from the script in the same location.It should be run on a machine with good connectivity to the Active Directory domain controller.

Leave a Reply