In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to import and export accounts in batch in AD domain. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
First, the demand is put forward.
There is a need for work, need to import some accounts in bulk, and require some attributes, such as: department, position, extension and so on!
In fact, the demand is very simple, the solution is also very simple, but in the actual operation process, there are indeed some problems, GG and BD, but also read some other people's blog and other content, but most of them are the same, and even directly copy the Microsoft help and support center template, there is no actual operation case explanation, as well as operational precautions, according to its blog operation There are always problems of one kind or another! For this reason, although this article is very simple, I still want to write it and share it with you. What I share is not only the actual solution, but also the attitude of being careful and responsible.
When we get this requirement, we may have to ask, where should I get these attributes? I can't remember so many attribute values! In fact, we can also be flexible, we can first import, and then according to the exported file to compare these attribute values can be completed, let's take a look at the process!
Second, environmental description
One DC (2003 system with office 2007 installed)
2. The domain name is: TT.Com
3. Create an OU:TT and a user under the OU of TT:
Third, use csvde to export your account
Microsoft provides two bulk import and export tools by default, which are CSVDE (CSV directory interchange) and LDIFDE (LDAP data interchange format directory interchange). Which one depends on the task that needs to be completed. If you need to create an object, you can use either CSVDE or LDIFDE, and if you need to modify or delete an object, you must use LDIFDE. We choose csvde here!
1. Open cmd and change the directory to the root directory of disk C, which is convenient for us to find files, as shown in figure 1.
Csvde-f user.Csv exports the AD object to a file named user.csv, and the-f switch indicates the name of the output file followed by it.
Figure 1
2. The amount of information derived above is very large. From the figure, we can see that there are 200 projects, so there will be too much information that interferes with us, which makes it inconvenient for us to find what we want. We can appropriately add a few parameters to derive the information we want most, as shown in figure 2.
Note: TT this OU and user alice (I have filled in some attributes of this user, such as position, department, extension, etc., and fill in the relevant items if you need any attributes, but you can fill in English for better results, because garbled codes will appear after Chinese export. of course, it can also be solved by adding a parameter-u during export, but it is not very convenient for us to edit later. So try to use English as a template) I set up to export the attribute values we need, it doesn't matter, just export a template of attribute values for our reference! From the picture, we can see that only 2 projects have been exported this time, which is much clearer than the last one! Of course, there are still many parameters for csvde, but there are really not many we can use. If you know more, you can type "?" Check it out, or refer to the official website: http://technet.microsoft.com/zh-cn/lipary/cc732101(v=ws.10)
1 u + z-@ 4 Q) l* L9 GJ
Figure 2
Fourth, edit the template
According to the information exported in the previous step, we can find the attribute values of the information we need, such as position, department, extension, etc., which are "title,department,telephoneNumber" respectively. In fact, there is a skill that we can directly modify the csv file and do not need to create a new one! We delete the other things we don't need, leaving only what we need, as shown in figure 3
Figure 3
Fifth, import users
Open cmd, change to the root directory of disk C, and use the command to import, as shown in figure 4
Csvde-I-f user2.csv-I means to import and-f means to specify a file
Figure 4
Sixth, because the tool can not directly import the password, and we used 514 in the import, which means to lock the account, the user's password is empty, and the user needs to change the password the next time they log in. This is obviously not safe, as shown in figure 5
Figure 5
Seven, enable the account and set the initial password!
1. Because the current user is an empty password, our default domain policy requires complexity, so we cannot enable the user for the time being. We change the password first. Because there are more users, it is troublesome to change the password one by one, and the tool does not allow the password to be imported, so we can use a bat file to change the user, as shown in figure 6. Save as pwd.bat after the establishment is completed. Open cmd and switch to the C root directory to run it, and see the finished result!
Figure 6
2, then, use shift for multi-selection, right-click to enable users! As shown in figure 7
Figure 7
Eighth, check whether the result meets the demand.
We open a user to see if the position, department, and extension exist, as shown in figure 8
This is the end of the article on "how to batch import and export accounts in AD domain". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.