The mapadmin Windows command-line utility administers
User Name Mapping on the local computer or on a remote computer
running Windows Services for UNIX version 3.0. If you are logged on
with an account that does not have the privileges required to
administer User Name Mapping on the computer, you can specify a
user name and password of an account that does.
In addition to specific command arguments, mapadmin
accepts the following arguments and options:
server
Specifies the remote computer you want to administer.
-uusr
Specifies the user name of the user whose credentials are to be
used. It might be necessary to add the domain name to the user name
in the form domain\username.
-ppword
Specifies the password of the user. If you specify the
-u option but omit the -p option, you are prompted
for the user's password.
The specific action that mapadmin performs depends on the
command argument you specify:
start
Starts the User Name Mapping service.
stop
Stops the User Name Mapping service.
config
Specifies general settings for User Name Mapping. The following
options are available with this command argument:
-ddomain
Specifies the Windows domain name to be used for simple
mapping. Although this option continues to be supported for the
sake of compatibility with earlier version, you should use
adddomainmap instead.
-ynisDomain
Specifies the Network Information Service (NIS) domain to be
used for simple mapping. Although this option continues to be
supported for the sake of compatibility with earlier version, you
should use adddomainmap instead. The following option is
available with this option:
-nnisServer
Specifies the NIS server for the NIS domain specified with the
-y option.
-rdddd:hh:mm
Specifies the refresh interval for updating from the Windows
and NIS databases in days, hours, and minutes. The minimum interval
is 5 minutes.
-fpath
Specifies the path where PCNFS passwd and group files are
located.
-iyes | no
Turns simple mapping on (yes) or off (no). By
default, simple mapping is on.
add
Creates a new mapping for a user or group. The following
options are available with this command argument:
-wuname
Specifies the name of the Windows user for which a new mapping
is being created.
-uuname
Specifies the name of the UNIX user for which a new mapping is
being created.
-wggroup
Specifies the name of the Windows group for which a new mapping
is being created.
-uggroup
Specifies the name of the UNIX group for which a new mapping is
being created.
-setprimary
Specifies that the new mapping is the primary mapping.
setprimary
Specifies which mapping is the primary mapping for a UNIX user
or group with multiple mappings. The following options are
available with this command argument:
-wuname
Specifies the Windows user of the primary mapping. If more than
one mapping for the user exists, use the -uu option to
specify the primary mapping.
-uuname
Specifies the UNIX user of the primary mapping.
-wggroup
Specifies the Windows group of the primary mapping. If more
than one mapping for the group exists, use the -ug option to
specify the primary mapping.
-uggroup
Specifies the UNIX group of the primary mapping.
delete
Removes the mapping for a user or group. The following options
are available for this command argument:
-wuuser
The Windows user for whom the mapping will be deleted,
specified as WindowsDomain\UserName. You must specify either
the -wu or the -uu option, or both. If you specify
both options, the particular mapping identified by the two options
will be deleted. If you specify only the -wu option, all
mappings for the specified user will be deleted.
-wggroup
The Windows group for which the mapping will be deleted,
specified as WindowsDomain\GroupName. You must specify
either the -wg or the -ug option, or both. If you
specify both options, the particular mapping identified by the two
options will be deleted. If you specify only the -wg option,
all mappings for the specified group will be deleted.
-uuuser
The UNIX user for whom the mapping will be deleted, specified
as UserName. You must specify either the -wu or the
-uu option, or both. If you specify both options, the
particular mapping identified by the two options will be deleted.
If you specify only the -uu option, all mappings for the
specified user will be deleted.
-uggroup
The UNIX group for which the mapping will be deleted, specified
as GroupName. You must specify either the -wg or the
-ug option, or both. If you specify both options, the
particular mapping identified by the two options will be deleted.
If you specify only the -ug option, all mappings for the
specified group will be deleted.
list
Displays information about user and group mappings. The
following options are available with this command argument:
-all
Lists both simple and advanced mappings for users and
groups.
-simple
Lists all simple mapped users and groups.
-advanced
Lists all advanced mapped users and groups. Maps are listed in
the order in which they are evaluated. Primary maps, marked with an
asterisk (*), are listed first, followed by secondary maps, which
are marked with a carat (^).
-wuname
Lists the mapping for a specified Windows user.
-wggroup
Lists the mapping for a Windows group.
-uuname
Lists the mapping for a UNIX user.
-uggroup
Lists the mapping for a UNIX group.
backup
Saves User Name Mapping configuration and mapping data to the
file specified by filename.
restore
Replaces configuration and mapping data with data from the file
(specified by filename) that was created using the
backup command argument.
adddomainmap
Adds a simple map between a Windows domain and an NIS domain or
PCNFS passwd and group files. The following options are available
for this command argument:
-dWindowsDomain
Specifies the Windows domain to be mapped.
-yNISDomain
Specifies the NIS domain to be mapped.
-nnisServer
Specifies the NIS server for the NIS domain specified with the
-y option.
-fpath
Specifies the fully qualified path of directory containing the
PCNFS passwd and group files to be mapped. The files must be
located on the computer being managed, and you cannot use
mapadmin to manage a remote computer to set up maps for
PCNFS users and groups.
removedomainmap
Removes a simple map between a Windows domain and an NIS
domain. The following options and argument are available for this
command argument:
-dWindowsDomain
Specifies the Windows domain of the map to be removed.
-yNISDomain
Specifies the NIS domain of the map to be removed.
-all
Specifies that all simple maps between Windows and NIS domains
are to be removed. This will also remove any simple map between a
Windows domain and PCNFS passwd and group files.
listdomainmaps
Lists the Windows domains that are mapped to NIS domains or
PCNFS passwd and group files.
If you do not specify a command argument, mapadmin
displays the current settings for User Name Mapping.
For all options that specify a user or group name, the following
formats can be used:
For Windows users, use the form
domain\username,
\\computer\username,
\computer\username, or
computer\username
For Windows groups, use the form
domain\groupname,
\\computer\groupname,
\computer\groupname, or
computer\groupname
For UNIX users, use the form
NISdomain\username,
username@NISdomain,
PCNFS@username, or PCNFS\username
For UNIX groups, use the form
NISdomain\groupname,
groupname@NISdomain,
PCNFS@groupname, or
PCNFS\groupname
Common options
The following options and arguments can be used with any
subcommand:
server
Specifies the remote computer you want to administer.
-uusr
Specifies the user name of the user whose credentials are to be
used. It might be necessary to add the domain name to the user name
in the form domain\username.
-ppword
Specifies the password of the user. If you specify the
-u option but omit the -p option, you are prompted
for the user's password.