Re: Create New User and Home Directory
- From: "Glenn" <nospam@xxxxxxxxx>
- Date: Wed, 12 Jul 2006 19:34:52 -0400
I figured out what I was doing wrong, and now have a new problem.
I can successfully create a new user using this macro...works great.
However, when I try to create a user who has a home directory listed on the
excel spreadsheet, I get an error saying "Error Assigning Permissions for
User". The user gets created, but the folder doesn't.
When I created the share for the home directories, I gave myself full
rights, and just used the default ones for everyone else.
On the Excel sheet, in the home directory column I am putting
\\server\homes\DoeJ
What am I missing here?
"Glenn" <nospam@xxxxxxxxx> wrote in message
news:e5hMM7dpGHA.3584@xxxxxxxxxxxxxxxxxxxxxxx
From the original question, I pasted your script into a macro in an excel
document that had one name in it as a test.
Then, I ran the Macro.
I get this error:
Compile error: Invalid Inside Procedure
When I click OK, Visual Basic Opens up and "Option Explicit" is what is
highlighted.
What am I doing wrong?
"Richard Mueller" <rlmueller-NOSPAM@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:ue7pdecpGHA.1548@xxxxxxxxxxxxxxxxxxxxxxx
Hi,
The script can be run from any computer joined to the domain, as long as
the user has sufficient rights in the domain.
The script can be modified to create home directories for existing users.
Instead of creating the users, bind to the user object with the
Distinguished Name. The code that checks for existence of the home
folder, creates it, and assigns permissions would be the same. I have a
similar program that modifies profilePath for users linked here:
http://www.rlmueller.net/UpdateUserProfile.htm
There is also a link to a program (CreateUserList3.vbs) to create the
spreadsheet with Distinguished Names of all users. You would remove users
that should not be modified, then add columns for home directory info.
Between these two examples you should be able to create a program to do
what you want.
--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
"Glenn" <nospam@xxxxxxxxx> wrote in message
news:%231sGfibpGHA.2256@xxxxxxxxxxxxxxxxxxxxxxx
Thanks. I will try this.
Do I have to run it on the server itself, or can I do it from a computer
attached to the domain?
Next question - is there a similar script to create home directories for
users already in Active Directory, and assign them rights?
"Richard Mueller" <rlmueller-NOSPAM@xxxxxxxxxxxxxxxxxxxx> wrote in
message news:OOaOefFpGHA.1592@xxxxxxxxxxxxxxxxxxxxxxx
Glenn wrote:
Is there a way to create a new user along with home directory (and
rights to it)?
Ideally I would like to be able to import a list of new users from a
list that I have. There are several.
Hi,
I have an example VBScript program that creates users from the
information in an Excel spreadsheet linked here:
http://www.rlmueller.net/CreateUsers.htm
The script assigns values for home directory, creates the home
directory folder if it does not exist, and assigns permissions. You may
be able to use this.
--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
.
- Follow-Ups:
- Re: Create New User and Home Directory
- From: Glenn
- Re: Create New User and Home Directory
- References:
- Create New User and Home Directory
- From: Glenn
- Re: Create New User and Home Directory
- From: Richard Mueller
- Re: Create New User and Home Directory
- From: Glenn
- Re: Create New User and Home Directory
- From: Richard Mueller
- Re: Create New User and Home Directory
- From: Glenn
- Create New User and Home Directory
- Prev by Date: Re: DC will offline for three weeks
- Next by Date: Re: Create New User and Home Directory
- Previous by thread: Re: Create New User and Home Directory
- Next by thread: Re: Create New User and Home Directory
- Index(es):
Relevant Pages
|