!=
!=    Gerald Carter
!=    Fri Jul 16 02:00:08 CDT 1999
!=
!=    readme file for domain migration perl scripts.
!=    Older copies of these scripts are included in the 
!=    Sams Teach Yourself Samba in 24 hours book
!=
!=    **These three scripts:
!=
!=        ntpass, nt2group, add2group
!= 
!=    are being released under version 2 of the GNU Public License
!=    See http://www.gnu.org for more information regarding details
!=    about this licensing mechanism.

ATTENTION
----------------------------------------------------------------------
Note that these three scripts are designed to be run in the
following order:

	nt2passwd
	nt2group
	add2group

It is very likely that you will need to modify these scripts
if you are using NIS or NIS+.  Play with the scripts and see 
what happens.  I am not responsible for anything
They are only provided as an attempt to help.

Please report bugs, inconsistencies (i know these are there), or 
general comments to

	Gerald Carter (people call me jerry)
	jerry@samba.org

Enjoy :)



:::::::::
nt2passwd
:::::::::

The nt2passwd script is designed to massage the output from the
NT command 'net user /domain' into a format compatible with the
standard UNIX /etc/passwd format.

   Usage: nt2passwd "inputfile"
       inputfile - output from net user /domain

For example,

	C:\WINNT\> net user /domain > users.txt

Then copy this file to your Samba server and run

	$ nt2passwd users.txt
	$ cat passwd.new >> /etc/passwd

The output from nt2passwd will be a two things:

   * passwd.new
   * username.map

The passwd.new file should be appended to system /etc/passwd.
It does not automatically create the accounts for you.

The username.map file is created when you must decide upon an
alternate name for account names with a length longer than
8 characters.  It can simply be used as the value for the smb.conf
parameter 'username map'.  See the smb.conf man page for
more information on this Samba parameter.


::::::::
nt2group
::::::::

The nt2group script is designed to translate the output from a 
'net group /domain' command run on your NT domain controller
into a format compatible with /etc/group.

Usage : nt2group -i <inputfile>
        <inputfile>     - output from 'net group /domain' command

Two files are created for you
 
    * group.new
    * group.map

The group map file created is a text file which contains entries 
mapping longer than 8 character group names (or ones with ' 's 
in them) to valid UNIX account names.  The format of an entry 
looks like

	<NT group name>:<UNIX group name>


Here an example entry:

	domain admins:domadmin
	...

Here is an example scenario:

	C:\WINNT\> net group /domain > groups.txt

Now copy the output file to your Samba server.

	$ nt2group -i groups.txt

	$ cat group.new >> /etc/group

:::::::::
add2group
:::::::::

This file is designed to translate the information gained from 
'net group <groupname>' and then print the new group file to 
standard output.

Usage : add2group -i <inputfile> -g <groupmapfile> -u <usermapfile>
        <inputfile>     - group membership from 'net group' command
        <groupmapfile>  - mapfile created by nt2group
        <usermapfile>   - mapfile created by nt2passwd

For information on the format and contents of the groupmapfile and 
usermapfile, see the sections of the nt2group and nt2passwd scripts
respectively.

Here is an example run:

	C:\WINNT\> net group "Web Development" /domain > webdev.txt

Again, copy the output file to your Samba server.

	$ add2group -i webdev.txt -g group.map -u username.map
	[...output deleted...]
	webdev:*:101:jerryc,shaggie,velma
	[...output deleted...]

Now update the line referring to the group your were parsing.

!=
!= end of readme.txt
!=
