Mapadmin command in Windows

You can use the mapadmin command to manage the username mapping for Microsoft services for the network file system.

You can use the mapadmin command to manage the username mapping for Microsoft Services (Microsoft services) for Network File System (network file system).

Syntax mapadmin command

 mapadmin [] [-u [-p ]] mapadmin [] [-u [-p ]] {start | stop} mapadmin [] [-u [-p ]] config mapadmin [] [-u [-p ]] add -wu -uu [-setprimary] mapadmin [] [-u [-p ]] add -wg -ug [-setprimary] mapadmin [] [-u [-p ]] setprimary -wu [-uu ] mapadmin [] [-u [-p ]] setprimary -wg [-ug ] mapadmin [] [-u [-p ]] delete mapadmin [] [-u [-p ]] list mapadmin [] [-u [-p ]] backup mapadmin [] [-u [-p ]] restore mapadmin [] [-u [-p ]] adddomainmap -d {-y <> | -f } mapadmin [] [-u [-p ]] removedomainmap -d -y <> mapadmin [] [-u [-p ]] removedomainmap -all mapadmin [] [-u [-p ]] listdomainmaps  mapadmin [] [-u [-p ]] mapadmin [] [-u [-p ]] {start | stop} mapadmin [] [-u [-p ]] config mapadmin [] [-u [-p ]] add -wu -uu [-setprimary] mapadmin [] [-u [-p ]] add -wg -ug [-setprimary] mapadmin [] [-u [-p ]] setprimary -wu [-uu ] mapadmin [] [-u [-p ]] setprimary -wg [-ug ] mapadmin [] [-u [-p ]] delete mapadmin [] [-u [-p ]] list mapadmin [] [-u [-p ]] backup mapadmin [] [-u [-p ]] restore mapadmin [] [-u [-p ]] adddomainmap -d {-y <> | -f } mapadmin [] [-u [-p ]] removedomainmap -d -y <> mapadmin [] [-u [-p ]] removedomainmap -all mapadmin [] [-u [-p ]] listdomainmaps  mapadmin [] [-u [-p ]] mapadmin [] [-u [-p ]] {start | stop} mapadmin [] [-u [-p ]] config mapadmin [] [-u [-p ]] add -wu -uu [-setprimary] mapadmin [] [-u [-p ]] add -wg -ug [-setprimary] mapadmin [] [-u [-p ]] setprimary -wu [-uu ] mapadmin [] [-u [-p ]] setprimary -wg [-ug ] mapadmin [] [-u [-p ]] delete mapadmin [] [-u [-p ]] list mapadmin [] [-u [-p ]] backup mapadmin [] [-u [-p ]] restore mapadmin [] [-u [-p ]] adddomainmap -d {-y <> | -f } mapadmin [] [-u [-p ]] removedomainmap -d -y <> mapadmin [] [-u [-p ]] removedomainmap -all mapadmin [] [-u [-p ]] listdomainmaps  mapadmin [] [-u [-p ]] mapadmin [] [-u [-p ]] {start | stop} mapadmin [] [-u [-p ]] config mapadmin [] [-u [-p ]] add -wu -uu [-setprimary] mapadmin [] [-u [-p ]] add -wg -ug [-setprimary] mapadmin [] [-u [-p ]] setprimary -wu [-uu ] mapadmin [] [-u [-p ]] setprimary -wg [-ug ] mapadmin [] [-u [-p ]] delete mapadmin [] [-u [-p ]] list mapadmin [] [-u [-p ]] backup mapadmin [] [-u [-p ]] restore mapadmin [] [-u [-p ]] adddomainmap -d {-y <> | -f } mapadmin [] [-u [-p ]] removedomainmap -d -y <> mapadmin [] [-u [-p ]] removedomainmap -all mapadmin [] [-u [-p ]] listdomainmaps 

Describe

The mapadmin command-line utility manages the mapping of usernames on local or remote computers running Microsoft Services for Network File System. If you sign in with an account that doesn't use admin login information, you can specify the account username and password.

In addition to the specific command arguments , the mapadmin command accepts the following arguments and options:

- Specify the remote computer to run the User Name Mapping service (the service that maps the username) that you want to administer. You can specify a computer by using the name of the Windows Internet Name Service (WINS) or the Domain Name System (DNS) name or Internet Protocol (IP) address.

-u - Specify the user name of the user whose login information will be used. You may need to add the domain name to the user name in the domain user name .

-p - Specify user password. If you specify the -u option but omit the -p option , you will be prompted to enter the user's password. The specific action that mapadmin command executes depends on the command argument you specify.

Parameters

start

Start the User Name Mapping service.

stop

Stop using the User Name Mapping service.

config

Specify the common setting for User Name Mapping. The following options are available with this command argument:

  1. -r :: - Specify the refresh interval to update from Windows and NIS databases by date, hour and minute. Minimum time is 5 minutes.
  2. no} - Enable ( yes ) or ( no ) simple mapping (simple mapping feature). By default, simple mapping will be enabled.
  3. add - Create new maps for users or groups. The following options are available with this command argument:
Option Description-wu Specifies the name of the Windows user whose new mapping is being created. -uu Specifies the name of the UNIX user whose new mapping is being created. -wg Specify the name of the Windows group to which the new mapping is being created. -ug Specifies the name of the UNIX group to which the new mapping is being created. -setprimary Specifies that the new map is the primary map.
  1. setprimary - Specifies which mapping is the primary mapping for a user or UNIX group with multiple mappings. The following options are available with this command argument:
Option-wu Description Specifies the Windows user of the main mapping. If more than one map for the user exists, use the -uu option to specify the primary mapping. -uu Specifies the UNIX user of the main map. -wg Specifies the Windows group of the primary mapping. If more than one map for the group exists, use the -ug option to specify the primary mapping. -ug Specifies the UNIX group of the main map.
  1. delete - Removes mapping for users or groups. The following options are available for this command argument:
Option Description-wu Windows users whose mapping will be deleted, specified as < WindowsDomain> . You must specify the option -wu or -uu or both. If you specify both options, the specific mapping identified by the two options will be deleted. If you specify the -wu option , all mappings for the specified user will be deleted. -wg

The Windows group whose mapping will be deleted, is specified as. You must specify the -wg or -ug option or both. If you specify both options, the specific mapping identified by the two options will be deleted. If you specify the -wg option , all mappings for the specified group will be deleted.

-uu UNIX user whose mapping will be deleted, is specified as . You must specify the option -wu or -uu or both. If you specify both options, the specific mapping identified by the two options will be deleted. If you specify the -uu option , all mappings for the specified user will be deleted. -ug UNIX group whose mapping will be deleted, is specified as . You must specify the -wg or -ug option or both. If you specify both options, the specific mapping identified by the two options will be deleted. If you specify the -ug option , all mappings for the specified group will be deleted.
  1. list - Displays information about group and user mapping. The following options are available with this command argument:
Options Description-all Lists both simple and advanced mapping for users and groups. -simple List all simple mapped users and groups. -advanced List all advanced mapped users and groups. The map is listed in the order in which they are evaluated. The main map, starred (*), is listed first, followed by a secondary map, marked with a (^) sign. -wu List mapping for specified Windows users. -wg List mapping for Windows groups. -uu Listing mapped to UNIX users. -ug List mapping for a UNIX group.
  1. backup - Save the data and configure the User Name Mapping to the file specified by .
  2. restore - Replace data and configure mapping by data from the file (specified by ) created using the backup command argument.
  3. adddomainmap - Add a simple mapping between Windows domain names and NIS domains or passwords and group files. The following options are available for this command argument:
Option Description-d Specifies the mapped Windows domain. -y Specify the mapped NIS domain.

-n Specify the NIS server for the specified NIS domain with the -y option . -f Specifies the qualified directory path containing the mapped password and group files. Files must be placed on the computer that is being managed and you cannot use the mapadmin command to manage the remote computer for setting passwords based on passwords and group files.
  1. removedomainmap - Removes a simple mapping between the Windows domain and the NIS domain. The following options and arguments are available for this command argument:
Option-d Description Specifies the Windows domain of the mapping to be deleted. -y Specify the NIS domain of the mapping to be deleted. -all Specifies that all simple mappings between Windows and NIS domains will be removed. This will also remove any simple mapping between Windows domain names, passwords and group files.
  1. listdomainmaps - List Windows domains mapped to NIS domains or passwords and group files.

Note

  1. If you do not specify a command argument, the mapadmin command will display the current settings for User Name Mapping .
  2. For all options to specify a username or group, the following formats can be used:
    1. For Windows users, use the form,,, or
    2. For Windows groups, use the form <>, <>, <>, or <>
    3. For UNIX users, use the form,, user @PCNFS, or PCNFS
    4. For UNIX groups, use the form, @, @PCNFS, or PCNFS

See more:

  1. The dfsrmig command in Windows
  2. Eventquery command in Windows
  3. Cmd command in Windows
4.4 ★ | 7 Vote