How to change the domain of a migrated user or group in Windows Services for UNIX 3.5 (891762)



The information in this article applies to:

  • Microsoft Windows Services for UNIX 3.5

INTRODUCTION

This article describes how to change the domain of a migrated user or group in Microsoft Windows Services for UNIX 3.5 by using command-line commands.

MORE INFORMATION

To modify the domain of a user or a group, you must follow these steps:
  1. Save the user data.
  2. Remove the user by using the nismap del command.
  3. Migrate the user to the new domain by using the nismap command or by using the nis2ad command.
To change the domain of a user or group, follow these steps:
  1. Run the following ypmatch command to retrieve the data for the particular user or group:

    ypmatch -d old_domain_name -k name mapname

    Note In this command, replace the placeholders as follows:
    • Replace old_domain_name with the name of the original domain.
    • Replace name with the name of the user or group that you want to move to the new domain.
    • Replace mapname with passwd if you run this command against a user name or replace mapname with group if you run this command against a group name.
  2. Save this information in a temporary file that is named passwd or group, depending on whether you run this command against a user name or a group name.
  3. Remove the user or group by using the following nismap del command:

    nismap del -a old_domain_name -k name mapname

  4. Add this user or group to the new domain by using the following nis2ad command:

    nis2ad -a new_domain_name -y new_domain_name -m -d directory_name mapname

    Note In this command, replace the placeholders as follows:
    • Replace new_domain_name with the name of the new domain.
    • Replace directory_name with the path of the directory where you saved the temporary file in step 2.
    • Replace mapname with the passwd if you run this command against a user name or replace mapname with group if you run this command against a group name.
    Note You can also add this user to the new domain by using the nismap add command.

Additional information for multiple users or groups

If you have to change the domain for multiple users or groups, follow these steps:
  1. Run the ypcat command to obtain a list of all the users or groups. Use the -k option to display the map keys. In this scenario, the key is the user name or the group name, depending on whether you are dealing with a passwd map or a group map.

    Note The key is required for the nismap del command that you run in step 3.
  2. Save the keys and the data for all the users or groups.
  3. Run the nismap del command for each key that you saved in step 2.
  4. Run the nis2ad command or run multiple nismap add commands to add the users or groups to the new domain.
For additional information about the options for the ypcat command, type man ypcat, and then press ENTER in a UNIX shell. For additional information about the nismap command, type man nismap, and then press ENTER in a UNIX shell.

For additional information about the Windows command-line tools for Windows Services for Unix 3.5, see Windows Services for Unix 3.5 Help.

Modification Type:MajorLast Reviewed:2/2/2005
Keywords:kbhowto kbinfo KB891762 kbAudDeveloper