[THIN] Setting a home directory script

  • From: "Jim Strowe" <jstrowe@xxxxxxxxxxxxxxxx>
  • To: <thin@xxxxxxxxxxxxx>
  • Date: Thu, 23 Jun 2005 21:38:12 -0400

Actually I'm probably going to use a net/user to generate the list.  Funny
thing about AD, it does not give me the name the same as the login name.
i.e. it gives me the common name of MICKEY MOUSE, but I don't see poor
Mickey's normal user name of MMOUSE.  (unless I use net/user and pipe it to
a text file.

It's a bit cludgy but I can force 300 little wimpy scripts to generate.  DOS
redirection and For commands I'm very comfortable with.  Is there a better
way, ...oh probably but this will work. 

Subject: [THIN] Re: Setting a home directory script
Date: Thu, 23 Jun 2005 08:45:10 +0100
From: "Braebaum, Neil" <Neil.Braebaum@xxxxxxxxxxxxxxxxx>
Comments inline...
> -----Original Message-----
> From: thin-bounce@xxxxxxxxxxxxx
> [mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Jim Strowe
> Sent: 23 June 2005 01:39
> To: thin@xxxxxxxxxxxxx
> Subject: [THIN] Setting a home directory script
>
> OK, I know it's the "gee jim write the script yourself" but I
> don't know what I'm looking at.
> Using the below code example:
> 1. Is WinNT a keyname, calling a function or what? I'll
> assume the getobject is where I put in myserver and myname.
WinNT is a provider via ADSI - there are numerous - GC, LDAP, NWCOMPAT -
I seemt to recall there's another, but they don't tend to come to mind
when all I normally use are WinNT and LDAP - and occasionally GC.
> 2. the two put commands, is the Homedirectory the keyword and
> "directory path" where I'm supposed to put in my variable?
Yup - homedirectory being the attribute name, and the other bit could be
a magic string, or a variable.
> 3. is the syntax for the second PUT the same; i.e.
> homedirdrive is what I'm modifying and H: is what I'm telling
> it to populate with?
Yup. If memory serves, homedirdrive is only provided through the WinNT
provider.
> Considering I have to do this Saturday night I kind of have a
> little pressure to know what I'm doing. The terminal
> services stuff I've got under control using TSCMD. This I do
> not. I'd probably do this brute force by using my AD list,
> but that's ok it's ugly but effective. (300 users)
Do you have any other criteria you could use - ie group membership, OU
hierarchy, some other user attribute being set?
> How do I set a user's home directory using ADSI?
>
> Set UserObj =GetObject("WinNT://myserver/myname")
> UserObj.put "HomeDirectory", "Directory Path"
> UserObj.put "HomeDirDrive", "H:"
> UserObj.SetInfo
> Set UserObj =Nothing
Neil

********************************************************
This Weeks Sponsor: eg Innovations, Inc.
Enabling Proactive Infrastructure Triage eG Innovations, Inc. is the leading 
provider of real-time monitoring and proactive triage solutions
for IT Infrastructures.
http://www.eginnovations.com/egcitrix.htm
**********************************************************
Useful Thin Client Computing Links are available at:
http://thin.net/links.cfm
ThinWiki community - Excellent SBC Search Capabilities!
http://www.thinwiki.com
***********************************************************
For Archives, to Unsubscribe, Subscribe or
set Digest or Vacation mode use the below link:
http://thin.net/citrixlist.cfm

Other related posts: