Script to Configure Group Mapping
In our example we have created a UNIX/Linux group called ntadmin .
Our script will create the additional groups Orks , Elves , and Gnomes .
It is a good idea to save this shell script for later use just in case you ever need to rebuild your mapping database.
For the sake of convenience we elect to save this script as a file called initGroups.sh .
This script is given in
intGroups.sh.
Example11.3.Script to Set Group Mapping
#!/bin/bash
net groupmap modify ntgroup="Domain Admins" unixgroup=ntadmin
net groupmap modify ntgroup="Domain Users" unixgroup=users
net groupmap modify ntgroup="Domain Guests" unixgroup=nobody
groupadd Orks
groupadd Elves
groupadd Gnomes
net groupmap add ntgroup="Orks" unixgroup=Orks type=d
net groupmap add ntgroup="Elves" unixgroup=Elves type=d
net groupmap add ntgroup="Gnomes" unixgroup=Gnomes type=d
Of course it is expected that the administrator will modify this to suit local needs.
For information regarding the use of the
net groupmap
tool please
refer to the man page.
|