Solved

domain controller: not able to map user home folder

Posted on 2013-05-21
3
913 Views
Last Modified: 2013-05-23
I created a bat file and save in netlogon share folder, this is what I have in my batch file:

NET USE Q: /DELETE
NET USE Q: \\ppiser01\users\%username% /y

Before I put the batch in each user's profile "logon script", I tested within the domain admin account. I double clicked the batch, the cmd screen popped up and disappear but no user folder and Q drive created.

But when I put \\ppiser01\users\%username% in user's profile, under "Home folder" -> connect, it will create the folder and map the drive... so what is wrong with the first method?
0
Comment
Question by:okamon
3 Comments
 
LVL 4

Expert Comment

by:Rsilva98
ID: 39185024
Why a batch file  ?


Go to AD users and computers and choose Profile Tab on each account.

there you can give the users the home folder you want

Just choose home folder, connect, choose drive letter and put you share on it

Ex: \\server\share$\%username% (when you apply it a folder will be  createt automatically on home folder root)
0
 
LVL 26

Accepted Solution

by:
pony10us earned 400 total points
ID: 39185040
The first method (the batch file) makes the assumption that the Q drive has already been mapped so needs to delete the mapping.  This step is not a show stopper though.

The real issue is that the next command simply attempts to map the Q drive to \\ppiser01\users\%username% which if it doesn't already exist it can't map it and will return:

System error 53 has occurred.

The network path was not found.

If you run the batch file from a command line you will see this.

In the user's profile if the folder doesn't exist it will create the folder however you have no provision in your batch file to do so.


NET USE Q: /DELETE
if NOT EXIST \\ppiser01\users\%username% mkdir \\ppiser01\users\%username%
NET USE Q: \\ppiser01\users\%username% /y
0
 
LVL 10

Expert Comment

by:tmoore1962
ID: 39185143
login batch file needs to be in the windows\sysvol\sysvol\"domain"\scripts folder.
The folder /share Users must exist. Then it should create the username folder under the users folder.  However the ownership will be the admin account and not the user account, also you have to have the permissions setup in the users folder, I've always went the extra step and did the individual folder permissions manually and tested that the desired permissions work.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
This article runs through the process of deploying a single EXE application selectively to a group of user.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question