[THIN] Re: How to move user profiles?

  • From: "Joe Shonk" <joe.shonk@xxxxxxxxx>
  • To: thin@xxxxxxxxxxxxx
  • Date: Thu, 9 Nov 2006 07:25:58 -0700

A couple things that could free up space on you OS partition.

If you add more disk space, you could move the pagefile file to the new
disk/partition...  I see alot of older TS that have a small C: (or M:) drive
but the D: (or N:) has plenty of space.  The first thing I do is Move the
pagefile.  This frees up 1-4 gigs off the top.

Second,  I clean up the existing user's Temp and Temporary Internet Files
and then implement a login script to cap each user's Temporary Internet
Cache to 1 meg.  As an alternative,  you could implement a policy to delete
the user's cache on exit.

If you're not using roaming profiles, maybe consider implementing them.
Especially if you have more that one server that serves the same function.

If you are using roaming profiles,  make sure you are excluding TEMP and
Temporary Internet Files.  Make sure user's My Doc is being redirected and
users cannot save files on the Desktop (otherwise redirect that too).

Make sure you are running UPHClean

Follow Rick's advice... He posted some very good stuff.

Joe

On 11/9/06, lindaday@xxxxxxxxxxx <lindaday@xxxxxxxxxxx> wrote:

Actually yes. All of our users are on Terminal Server and we just did not
start out with a large enough server when we designed it to accommodate our
ever expanding use. We have other servers, of course for their files and all
of our systems, etc., but these profiles are just getting so loaded up that
we never anticipated this much. We wanted to know if we could partition the
server and add more space so we did not have to keep having these emergency
fire drills to keep things under control as it gets full and then we have to
go in and clean out all of the clutter. Also we are now utilizing a database
whereby the front end is now sitting in each profile and that in itself was
not anticipated. Because each person has their own front end it is even
bigger. I suggested to our network engineer, just get a larger server and he
said it is not possible at this point which to me there has to be a way, yes
it may be difficult, but I want our users to be happy and not have a full
server all of the time. I told him I would turn to all of you for help as I
love you guys and you are all so smart and I know you can help me. This has
to be a common issue for people who were early birds in using Terminal
Server for few years.
Thanks,
Linda


-------------- Original message --------------
From: "Rick Mack" <Rick.Mack@xxxxxxxxxxxxxx>
Hi Linda,

I'm assuming that your question refers to locally cached, non-roaming
profiles, otherwise all you'd have to do is enable the delete local profile
on logoff option to save space and I've wasted your and my time :-(

If you've got more than one local drive, it's not too hard to move the
location for new profiles from c:\documents and settings to something like
d:\documents and settings or whatever.

The profile folder location is defined under
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Profilelist by the value
*ProfilesDirectory*.

If you change this value, any new user profiles will be created under the
new profile root.

I'd strongly suggest you use robocopy to copy the profiles to a new
location, eg with the command:

rebocopy "c:\documents and settings" "d:\documents and settings" /sec /mir
/r:0 /w:0

 Please be aware that the local service account profiles won't be copied
fully because the registry portion of the profile, ntuser.dat, is in use).

To "fix" this problem use the *regback* utility from the windows resource
kit (logged in as the local administor) eg

cd /d d:\documents and settings
cd LocalService
regback ntuser.dat users S-1-5-19
 cd ..\NetworkService
regback ntuser.dat users S-1-5-20

And even after copying all the profiles to the new profile folder, things
still won't quite work the way you expect.


Each user's local profile is registered as a subkey under
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Profilelist as the users
SID (security ID) and it has a value, *ProfileImagePath*, which will still
point to c:\documents and settings\%username%. So the operating system will
still expect/use these profiles in the old location.

At this point you've got 2 options, use delprof to delete all local
profiles and start again, or use a script to alter the ProfileImagePath
value for all locally cached profiles.

 A very simple kixstart script, which assumes things like all profile
names are the loggedin username only (no ..001 or .domain extensions) to do
this could be:

-----------------------
; setnewprofpath.kix - define new local profiles directory

; replace this value with your new profile folder
$newdir="d:\documents and settings\"
$regloc="HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
NT\CurrentVersion\ProfileList"

$count = 0
; for all the subkeys under $regloc, get the keyname
; convert it to a username and write the new profile location

:loop1
    $usersid = enumkey("$regloc", $count)
        If @error = 0
            $userid=sidtoname($usersid)

            
$result=writevalue($regloc+"\"+$usersid,"ProfileImagePath",$newdir+$userid,"REG_EXPAND_SZ")
            $count = $count+1
    goto loop1
endif

:end
------------------------

regards,

Rick

Ulrich Mack

*Volante Systems, a division of Commander*
------------------------------
*From:* thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx] *On
Behalf Of *lindaday@xxxxxxxxxxx
*Sent:* Thursday, 9 November 2006 1:12 PM
*To:* thin@xxxxxxxxxxxxx
*Subject:* [THIN] How to move user profiles?


 We have a problem with our profiles growing on our server for Terminal
and our server saying we are running out of room all of the time. Can we
move our profiles to another drive letter? If so, how do we do that. We are
in Windows 2003 Terminal Server.
Thanks,
Linda
------------------------------
This e-mail, including all attachments, may be confidential or
privileged.  Confidentiality or privilege is not waived or lost because this
e-mail has been sent to you in error.  If you are not the intended recipient
any use, disclosure or copying of this e-mail is prohibited.  If you have
received it in error please notify the sender immediately by reply e-mail
and destroy all copies of this e-mail and any attachments.  All liability
for direct and indirect loss arising from this e-mail and any attachments is
hereby disclaimed to the extent permitted by law.
------------------------------


Other related posts: