Link to home
Start Free TrialLog in
Avatar of Harold
HaroldFlag for United States of America

asked on

Windows 2003 Server - Default Users Folders and login scirpting

We have added Active Directory to our W2003 Server and all ready created our users. We want to set the default user to another drive for space. In the properties of each user we have pointed each to the correct drive and path per user. We have shared the folder and created each user name, as well.

I have tried a couple of options on login script commands to add the user folder but am having no luck using.....

/profilepath  or   /profilepath

Would it be easier just to map the drive?
What is the correct variable for the username?
How do we make it so the user only has permission to their folder?

Regards
Avatar of snusgubben
snusgubben
Flag of Norway image

Avatar of Harold

ASKER

"Are you talking about home folder?"  If referring to the Home directory as the Users home directory yes.

I thought when you created users intially it created, user directories but I never found all the directories for as many users as I created. Therefore I had created a \\server\users\usernames path for each user.
If you set the share and NTFS permissions correctly, the home folder will be created when you create the user, and set the home folder like \\server\share\%username%. This is described in the link above.

You don't need to create i.e. a logon script mapping to get this folder. AD will handle this.
Avatar of Harold

ASKER

Does it matter what I call the directory name or does it have to be called HOME?
Avatar of Harold

ASKER

"You don't need to create i.e. a logon script mapping to get this folder. AD will handle this."  How is the drive going to be mapped so the can set it in a application as the default location to save?
You can call it whatever you want, but it's always nice to give it a describing name.


In the blog entry they used H: as the letter:

http://blogs.technet.com/blogfiles/askds/WindowsLiveWriter/Automaticcreationofuserfoldersforhomero_1018F/image_8.png

When this user logs on, he will get a mapping H:\%username%
Avatar of Harold

ASKER

The mapping is mapped to.....

H:\Home$      which then shows all the users folders. It does not go to the specific users folder.
Do you have Win7 clients?
Avatar of Harold

ASKER

Yes. 1, the rest XP Pro.

One thing I have notice, is in the Directory path on the user config. when I put the path \\server\Home$\%UserName%...it always replaces the %username% with the username instead of the leaving variable.
Does it map it like that on both Win 7 and Win XP?

Like you say: \\server\share

and not like it should: \\server\share\%username%


...it always replaces the %username% with the username instead of the leaving variable.

That is normal and correct behavior. %username% is a variable.
Avatar of Harold

ASKER

I'll try the Windows 7 machine, but the Home directory is not being "mapped" or setup when the user logs in.
On the Win 7, verify in Disc Management (compmgmt.msc) that the letter you sat on the Home folder is not occupied by i.e. a SD card reader or similar.

Do you use a logon script?
Avatar of Harold

ASKER

No machine XP nor Windows 7 is mapping the user home directory. I'm lost.
You said in http:#34916410 

The mapping is mapped to.....

H:\Home$      which then shows all the users folders. It does not go to the specific users folder.


Is this what the users are seeing, or is not the H:\ mapped at all in Explorer?
Avatar of Harold

ASKER

This is what I get when I issue the following......

Yes it was working and the folder would map to U: and you would see all th euser folders. Now it will not even map.

net use u: /home
System error 53 has occurred.

The network path was not found.
Do you use a logon script? If yes, can you copy the content here?
Avatar of Harold

ASKER

REM:  User drive mappings
net use o: /delete
net use o: \\iconserver\data

rem net use u: /delete
rem /profilepath:\\zippy\profile
So these two lines is the one you use?

net use o: /delete
net use o: \\iconserver\data

(Just make sure this one don't come into play as Win 7 will lose the home mapping. rem net use u: /delete)

Can you post a screenshot of the profile tab of one user?
Avatar of Harold

ASKER

Yes currently only mapping, as I want the system to handle the home directory mapping, I HOPE!


screenshot.bmp
Avatar of Harold

ASKER

I also tried typing this in the Address: bar of My Computer and it fails to work either.....

\\server\share\%username%
Do you assign D: to the home folder? Make sure it's not taken by the DVD/CD.

If you logon on with "crichard", "Start" -> Run -> "\\iconserver\Home$\crichard"
any luck with that?
Avatar of Harold

ASKER

I am not at there office now, but if I log in remotely and issue the command at the server, it opens a window to the folder of the user testing.
Then we can assume permissions is correct.

It looks fishy to assign D: to the home folder. Most computers already have this mapped to their CD/DVD drive. Can you try to change it to i.e

N:

Avatar of Harold

ASKER

When I was at there office earlier, I had changed the users profile, that I was working with and it made no difference.

Mapped the data drive but no user/Home mapping.
Avatar of Harold

ASKER

I just added the following to the login.bat file and it works. I would like for it to work the way we have been trying but if it is flaky now, who knows when it my fail.

Unless you have any other ideas, I'll just give you the points, since you have been working with me.

What do you think?
Did you test on both XP and Win 7?

Try making a GPO and link it to a test OU where you place the computer object of the computer you are testing on:

Computer Configuration -> Administrative Templates -> System ->  Logon -> Always wait for the network at computer startup and logon

Set it to Enabled.
ASKER CERTIFIED SOLUTION
Avatar of snusgubben
snusgubben
Flag of Norway image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Harold

ASKER

This I did, with no change...."Computer Configuration -> Administrative Templates -> System ->  Logon -> Always wait for the network at computer startup and logon
Set it to Enabled. "

Then I found where I could do mappings in GPO, but when I try to navigate to the option on my server, it was not there. So then I something else to work, got the DLLs registered and still no option to set mappings in GPO. Then I was really aggravated.

That's when I said h... with it, I'll map the damn thing and be done with it.
hehe...
Avatar of Harold

ASKER

I have setup the lo gin script and I'll check with the client in the morning. If all goes well, we'll call this even.

Regards
Avatar of Harold

ASKER

I ended up just using the mapping...
net use H: \\server\home$\%username%

No problems, as of yet.

Regards