Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

domain controller: not able to map user home folder

Posted on 2013-05-21
3
Medium Priority
?
921 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 1600 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
Suggested Courses

618 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