==========================
1. Copy addusers.exe, copypwd.exe, copypwd.dll to the root directory of drive c.
2. Back up user account: Open cmd, switch to the path to drive c (command: cd C:), and run addusers, command:
C:addusers /d:u account.bak // account.bak cannot be renamed, this must be used
Parameters: /d Export:u Use unicode characters.
The generated account.bak is also in the root directory of drive C, don’t forget it!
Open account.bak with Notepad and delete some built-in users! Because there are already these built-in users on the new server! For example, built-in users such as guests can be deleted by administrators according to their own needs!
3. Back up user password: Open cmd, switch to the path to drive c (command: cd C:), and run copypwd, command:
C:copypwd dump > copypwd.txt //The name of copypwd.txt cannot be changed either!
If you deleted some users in the previous step, you must also delete them after opening them here, otherwise an error message will be reported (the error message can be ignored).
The generated copypwd.txt is also in the root directory of drive C!
4. Import users and passwords to the new server:
First import the account through addusers:
Command: c:addusers.exe /p:ce /c Account.bak
Parameters: /p Password policy: c Users are not allowed to change passwords e: Passwords never expire
/c Import account /e Delete account
However, users must be deleted based on specific circumstances, such as some system users.
Import password:
c:copypwd.exe set //The backup cipher text file must be in the same directory.
5. Please pay attention to several points when using:
(1) copypwd.exe can only be used on a local session. If you use a remote desktop, an error will occur.
(2) In the Account.bak exported by addusers.exe, you need to change the computer name in it, because the computer name will change after the migration. You can also only keep the content under [User].
(3) After the users and passwords are imported to the new server, the user group may need to be reset.
In short, if there are a large number of users who need to import and export, it is much more convenient to use this tool.
it works
it works
it works