Jump to content

Recommended Posts

Posted

What do people use to create new users in active directory?

 

I have been using a product called interjigsaw for many years but the license is coming to an end.

 

I would like something that can create the user, password, description, home folder, permissions and if possible an exchange account as well.

 

How do you do it?

Posted
i use an excel sheet give it first name last name year of entry for each user and server name /domain name overall and it generates code that i can copy and paste into a batch file to create users, create shares and set permissions
Posted

I've just written a powershell script that does all of that. All we need to do is tell it if they are a student/nonteaching/teaching and their first and last name (and year if a student). it then creates a user in AD, adds them to the necessary AD Groups, makes their home folder and sets permissions. It also creates a exchange mailbox for staff.

 

Took me ages to do and typically we've hardly had anyone start since!

 

This is for individual users but can easily be edited to use a csv containing just that info to bulk create users.

  • 4 weeks later...
Posted
I've just written a powershell script that does all of that. All we need to do is tell it if they are a student/nonteaching/teaching and their first and last name (and year if a student). it then creates a user in AD, adds them to the necessary AD Groups, makes their home folder and sets permissions. It also creates a exchange mailbox for staff.

 

Took me ages to do and typically we've hardly had anyone start since!

 

This is for individual users but can easily be edited to use a csv containing just that info to bulk create users.

 

Can you post the script please?

 

I think power shell is probably the way I'm going to go with this.

Posted
Can you post the script please?

 

I think power shell is probably the way I'm going to go with this.

 

I can, but at the moment it is very specific to this school. I'll see if i can get it a bit more generic/easier to understand.

 

How are your usernames set up? This is one of the things that i expect will vary quite a lot between schools so won't be able to get the script working out of the box for everyone....

Posted
For free, I've used AccountManagement, which is a macro enabled Excel spreadsheet which integrates with AD. You set all the options on one page, select Groups etc, then just paste in your users from a csv, SIMS export etc. It creates the user areas unlike some I've used too. It has been superb - I had to use NTFSFix afterwards to set ownership of the new folders to the students, but this is simple too, and only really neessary if you use quotas.
Guest TheLibrarian
Posted
XIA Automation Server - CENTREL Solutions

 

Excellent product, flexible and really good support too.

 

BoX

 

+1 for this excellent product.

 

 

It should also be noted that user creation is only a very small part of what this product can do, and it is cheap.

 

 

I have no affiliation with the product - I'm singing its praises because I use it.

Posted (edited)
I can, but at the moment it is very specific to this school. I'll see if i can get it a bit more generic/easier to understand.

 

How are your usernames set up? This is one of the things that i expect will vary quite a lot between schools so won't be able to get the script working out of the box for everyone....

 

I wasn't really expecting it to work out of the box, just interested in the way you do it.

 

Our groups are setup like this

 

- StudentOU
                - SchoolName
                                 - Users
                                           - Students2008
                                           - Students2009
                                           - Students2010

 

 

I've been following this guide but need to modify it for exchange 2003

Edited by zag
Posted
Built in Microsoft AD tool DSADD. Works perfectly once you have an excel template set-up then it's just copy and paste to a dos prompt
Posted
Active User Manager - Free and works great...

 

Dont know which OS you have - it states that it works on Win2k and Win2k3

 

That actually looks pretty good. Worked well on my test CSV files.

 

But how do you create the user home drives?

Posted (edited)

You'll need to do that with a script, then use NTFSFix to set the permissions. That's the reason I dropped AUM, it took several times longer to use for me than AM.

 

Edit: you'll also need to set ownership for the folders for the FSRM. I have a script for this, place a copy of chown.exe in the main user folder, with this script:

 

rem sets permission on all files according to home directory name, place this and chown.exe into the \userfolders folder then run it.

for /D %%i in (*) do (
chown -r %%i "%%i\*.*"
)

Edited by 3s-gtech
Posted

Just create a batch file with the md command and run that in the folder you want to create your directories in. Then run calcs to assign the permissions on the folders.

 

kili

Posted (edited)

have my own wsh script but i have to manually create the userareas with xcacls and rmtshare. if you have the foldernames the same as the usernames it's easy.

 

create folders from a list of usernames

for /f %a in ('type usernames.csv') do mkdir %a

 

then for xcalcs and rmtshare operations you just have to do

 

for /f %a in ('dir *. /b') do whatever %a

 

 

 

 

i have to modify it this year to included registration numbers in an arbitrary ad field as matching ad data to sims data is a manual job in excel at the moment.

Edited by browolf
Guest TheLibrarian
Posted

Here's one version of the scripts I used to use, not the last one because I couldn't find it.

 

I probably deleted the latest version when we bought XIA Automation.

 

Should go without saying but I'll say it anyway: you use / modify these scripts at your own risk.

 

 

MakeUsers.bat

@echo off
if "%1" == "" goto instruct
if "%1" == "/?" goto instruct
if not exist "%1" goto end

:start
setlocal
for /f "skip=1 delims=, tokens=1,2,3" %%i in (%1) do (
call makeusers_dsadd.bat %%i %%j %%k DoIt
)
goto end

:instruct
cls
echo Usage:
echo makeusers [drive:\path\filename]
echo [filename] must refer to a comma separated value file.
echo,
echo The CSV file must contain:
echo One blank line at the top then on each following line forname,surname,username.
echo If you want the username to be auto-generated enter the username as ZZZ.
echo,
echo Requirements:
echo RCMD access to the server that the Home Directories are located on.
echo W2K Resource Kit commands XCACLS RCMD be available in the path.
echo Must run on XP Pro or W2K3 server (for DSADD and DSQUERY).
goto end

:end

 

makeusers_dsadd

@echo off
setlocal
REM Check the Home Directory Path!
net use x: \\FP3\d$
set hdd=X:
set hdp=\users\2007intake\
set svrhdd=D:
set svrhdp=\users\2007intake\
if not exist "%hdd%%hdp%." goto errorhdp
REM Check this has been called correctly
if not "%4" == "DoIt" goto end
if "%3" == "ZZZ" goto create_samid
set c_samid=%3
goto doit

:create_samid
set init=%1
set c_samid=07%2%init:~0,1%

:doit
for /f "delims=^^^" %%l in ('dsquery user -samid %c_samid%') do goto error
for /f "delims=^^^" %%l in ('dsquery user -name "%1 %2"') do goto error
%hdd%
cd "%hdp%"
md "%c_samid%"
"c:\program files\resource kit\rcmd\rcmd" \\FP3 c:\winnt\system32\net share %c_samid%$="%svrhdd%%svrhdp%%c_samid%" /UNLIMITED /GRANT:Everyone,FULL /CACHE:NO /REMARK:"%c_samid%'s Home Directory"
dsadd user "CN=%1 %2,OU=2007,DC=st-thomasmore,DC=walsall,DC=gov,DC=uk" -fn %1 -ln %2 -samid %c_samid% -display "%1 %2" -pwd 123456 -upn %c_samid%@st-thomasmore.walsall.gov.uk -profile \\FP3\profiles$\%c_samid% -loscr curric.bat -hmdir \\FP3\%c_samid%$ -hmdrv h: -memberof "CN=07Accounts,OU=2007,DC=st-thomasmore,DC=walsall,DC=gov,DC=uk"

"C:\Program Files\Resource Kit\xcacls.exe" "%hdd%%hdp%%c_samid%" /Y /P administrators:F
:redo
"C:\Program Files\Resource Kit\xcacls.exe" "%hdd%%hdp%%c_samid%" /E /G %c_samid%:F
if errorlevel 1 goto redo
"C:\Program Files\Resource Kit\xcacls.exe" "%hdd%%hdp%%c_samid%" /E /G "Full Control to Pupils Home Directories:F"
goto end

:error
echo %1 %2 common name or %c_samid% alread exists!>>error.txt
echo %1 %2 common name or %c_samid% alread exists!
goto end

:errorhdp
echo Home Directory Path Invalid!
goto end

:end

Posted
Dovestones tools here as well excellent for the price.

 

Ben

 

That looks more like it! Seems to be able to create home folders as well.

 

Which tools do you use out of the bundle?

Guest TheLibrarian
Posted
Personally I would not trade XIA Automation for the Dovestones tools (based on a quick perusal of the Dovestones tools). XIA Automation is not as cheap (it's ~£250 IIRC) but it's potential for automating so much more is immense.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...