Windows Server2012 domain user mapped network drive

Source: Internet
Author: User
Tags dsquery

Information security today, many enterprises are emphasizing that data does not fall, then a better solution is to put the user's important data on the company file server, in order to facilitate user operation, generally can map the function of network drive. If the number of users is relatively small, use the manual method. The implementation method is also simple:

In the first step, we need to share a shared folder on the file server, as shown in:

650) this.width=650; "height=" 617 "title=" image "style=" Border:0px;padding-top:0px;padding-right:0px;padding-left : 0px;background-image:none; "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6E/30/wKiom1V1w63igP6fAAH4RNbs_ 9m864.jpg "border=" 0 "/>

Then we go to the domain controller, edit the user properties, as shown, we took a three-cut:

650) this.width=650; "height=" 340 "title=" image "style=" Border:0px;padding-top:0px;padding-right:0px;padding-left : 0px;background-image:none; "alt=" image "src=" http://s3.51cto.com/wyfs02/M01/6E/30/ Wkiom1v1w62brkgtaae1xx1hqno985.jpg "border=" 0 "/>

In the configuration interface, we edit the home folder option, the mapped network drive is Z:, of course, as long as it is not used can be, the network path is: \\192.168.1.102\sharefile\%username%, when the app is clicked,%username% will be replaced with the current user name. Then let's go and test it. We go to a client computer, log in with ZS, and we see the interface shown:

650) this.width=650; "height=" 497 "title=" image "style=" Border:0px;padding-top:0px;padding-right:0px;padding-left : 0px;background-image:none; "alt=" image "src=" http://s3.51cto.com/wyfs02/M02/6E/31/ Wkiom1v1w63ifaveaafzusj8ltm385.jpg "border=" 0 "/>

Implementation, it is so simple, but a problem, if there are 1000 users in the enterprise what to do? So the setting is not no, as long as there is determination, iron bar grinding into needles, but the information society we have to speak a little technical content, fortunately, we have a way

We do this by using the tools dsquery the command line to find out all user accounts and then using dsmod to implement the bulk Set home folder option. Let's take a look at the details:

1, query the user's command line tool dsquery:

Open a command prompt, enter: dsquery user "ou=it,dc=cguardian,dc=com"

Note: You can find all users in the "IT" ou in the "Cguardian" domain by using the commands above.

2, modify the User Configuration command line tool dsmod:

At the command prompt, enter:

C:\>dsmod user "cn=zs,ou=it,dc=cguardian,dc=com"-hmdrv z:-hmdir \\192.168.1.102\sharefile\ $username $
As shown in the following:

650) this.width=650; "height=" "title=" image "style=" border:0px;padding-top:0px;padding-right:0px;padding-left:0 Px;background-image:none; "alt=" image "src=" http://s3.51cto.com/wyfs02/M00/6E/31/ Wkiom1v1w63qemjfaachxezcgcq538.jpg "border=" 0 "/>

Below, we use two commands in conjunction with everything OK, the command used is:

C:\>dsquery user "ou=it,dc=cguardian,dc=com" | dsmod user-hmdrv z:-hmdir \\192.168.1.102\sharefile\ $username $

650) this.width=650; "height=" 172 "title=" image "style=" Border:0px;padding-top:0px;padding-right:0px;padding-left : 0px;background-image:none; "alt=" image "src=" http://s3.51cto.com/wyfs02/M01/6E/31/ Wkiom1v1w63ti54gaadf22iaof8538.jpg "border=" 0 "/>

It's so simple, let's go to the client and use User04 to log on.

650) this.width=650; "height=" 543 "title=" image "style=" Border:0px;padding-top:0px;padding-right:0px;padding-left : 0px;background-image:none; "alt=" image "src=" http://s3.51cto.com/wyfs02/M02/6E/31/ Wkiom1v1w63aqvazaahbhahajic843.jpg "border=" 0 "/>

All right, here we go, our experiment is over. After experimental discovery, manually set up, the network path of the personal home directory will be automatically created, do not need to manually create, but the bulk of the user home folder modified by the personal home directory needs to be created manually, and the shared folder needs to give the user Read permissions, otherwise it will not be implemented. Of course, using scripts to create folders in bulk is not a big deal, minutes, in here no longer elaborate, time is not early, wash and sleep!

This article is from the "Duffy" blog, make sure to keep this source http://dufei.blog.51cto.com/382644/1659890

Windows Server2012 domain user mapped network drive

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.