December 28, 2008

Renaming Novell user accounts

Posted in Active Directory, Moodle, Novell, Utilities at 12:24 pm

Recently we had to change the login names for around 1200 students.

As part of this rename we needed to change their Novell eDirectory account and home directory. We also needed to ensure linked systems such as an LDAP authenticated Moodle site and an IDM linked Active Directory (AD) domain were properly updated.

To perform the user account and folder rename we used Mass User from HBWare. This is a great program we already used for creating and managing home directories and quotas. There was a small bug in the rename area, but it was quickly fixed when brought to Hans’ attention.
Note: Before beginning you need to have a list of the old usernames and the new usernames. A simple two column Excel or CSV file would be fine.

Novell

Create Mapping File: The mapping file is used by Mass User to know what to rename the existing username to.

Use NDS Report ( http://www.novell.com/coolsolutions/tools/13908.html ) to create a list of all the accounts. You only want the DN and CN fields. Save this as an Excel or CSV file.

NDS Report: Select Student OU

NDS Report: Select Student OU

NDS Report: Choose only CN

NDS Report: Choose only CN

Create a new MS Access file and import the account list
Import the text / excel file that lists the old and new account names.
You now need to create a query that maps the cn to the old account name, and then use this to generate a list of the full old dn and the new account name.

Access: Mapping Query

Access: Mapping Query

Access: Query Results

Access: Query Results

You can then export this as a text file.

Access: Export as text file

Access: Export as text file

Access: Export Delimited

Access: Export Delimited

You will need to set the field separate as ‘=’ and set the test qualifier to none.

Access: = as Delimiter and no Text Qualifier

Access: = as Delimiter and no Text Qualifier

You should end up with each line having format:
OLDNAME.OU.C=NEWNAME
Once the mapping file is generated you can apply it either to individual OUs (e.g. year groups), or to the entire Users container. I would recommend applying to small containers initially to allow checking for errors. After verifying all renames were performed correctly you can then apply the rename to your entire users’ container.

Mass User: Rename

Mass User: Rename

IDM 3.0 – Active Directory

Before doing the mass rename we did some simple tests of renaming eDirectory accounts to see how they replicated to Active Directory. We determined that the individual renames were successfully propagated through IDM to automatically change the pre-2000 and logon name fields to match the new eDirectory account.
When performing the mass rename of accounts, AD was checked after doing each OU to check propagation was successful. We experienced no problems with IDM and all accounts were successfully synchronised with Active Directory.

Moodle

For Moodle we wished for users to retain their own accounts including all their settings and course information. To do this the username stored in the Moodle Database (DB) would need to be changed to the new username.
Before making changes to Moodle I recommend putting the site in admin mode and temporarily disabling your LDAP authentication. I only put the site in Admin mode and then had problems during migration as some students had attempted to logon after I had renamed the eDirectory accounts, but before migrating Moodle accounts. This created new user accounts in Moodle that prevented the update queries running due to duplicate key name problems (ie the old account would not rename to new one if one has already been created with the new name)
First you need to import your list of old and new account names into the database. If you already have it in a separate DB on your Moodle server you can use that, otherwise it is best to just to create a new table in the Moodle DB.
I used this query to check the mapping fields. You will need to adjust the fields and collation types for your own setup.
I use the IDNumber field to store the full DN, if you use a different field you will need to adjust this.

Validation:

# Shows the current username, the new username and the new IDNumber field for validation check.
SELECT mdl.`username` , ern.`StudentId` , replace( `idnumber` , mdl.`username` , ern.`StudentId`
COLLATE latin1_swedish_ci )
FROM moodle.`mdl_user` mdl, sbhsdata.`oasisStudentIdMap` ern
WHERE mdl.`username`
COLLATE latin1_general_ci = ern.`OldStudentId`

Update:

# Replaces the IDNumber field with the new username.
UPDATE moodle.`mdl_user` mdl, sbhsdata.`oasisStudentIdMap` ern
SET `idnumber` = replace( `idnumber` , mdl.`username` , ern.`StudentId` COLLATE latin1_swedish_ci )
WHERE mdl.`username`
COLLATE latin1_general_ci = ern.`OldStudentId`

# Replaces the mdl_user field with the new username.
UPDATE `mdl_user` mdl, `rename` ren
SET mdl.`username` = ren.`newname`
WHERE mdl.`username`= ren.`oldname`

Note: As can be seen by the queries, during the migration I did two separate updates, one to update the IDNumber field and another to update the mdl_user field. When I had completed migration I realised I had only needed to update the mdl_user field as Moodle would automatically update the value in IDNumber at next log on.

Round Up

The migration to the new accounts went well with no problems from student passwords or accounts, although we had a few instances of students using the old username instead of the new one.

Since performing the change we have also implemented a Papercut system which would have required the additional step of renaming all of its accounts to ensure student balances were carried across.

Tags: , , , , , , , , , , ,

December 9, 2008

AD Password Reset and Bulk Modify

Posted in Active Directory, Utilities, Windows at 7:28 pm

Those who in the past have used the Novell Change Pass utility may have been missing it when moving to Active Directory.

A great tool is Wisesoft Password Control which allows you to just type in the username, it will display info about the account and give you the option to change the password, enable/disable the account and unlock the account.
It is ideal to make available to teachers for resetting the student passwords if you use the Delegate control option in AD Users and Computers for your student OU’s.

The other useful tool on the website is a pair of tools Bulk Password Control and Bulk Modify. These allow you to bulk reset the password for a large group of students, or modify the attributes for a large number of users. It can read these in from a CSV file, and match the CSV entires to either sAMaccountName or some other user attribute. You can also set the attribute based on their existing attributes.

After downloading it will ask you for a code that you can get with a free registration on their site.

Tags: , , , , , , , , ,

May 6, 2008

Access-based Enumeration

Posted in Active Directory, Windows at 6:55 pm

A great new feature in Windows Server 2003 is Access-based Enumeration (ABE).

What ABE does is hide any file or folder that a user does not have access to. So for example the folder where you store all your users home drives, would usually appear jam packed with folders, most of which would return an Access Denied error. However, with ABE installed users would only see the folders they have access to, usually their own.

This is great especially if you are coming from a Novell background where this is the standard behaviour. It is also very useful in a school situation to keep the students from seeing things they shouldn’t.

To use ABE you need to download the management tools from Microsoft ABE Management Tools, then after installation either enable it on all shares or bring up properties and manually add it to shares.

A better description and walk through is available WindowsNetworking: Implementing Access-Based Enumeration in Windows Server 2003 R2

Links in this post:


Tags: , , , , , , , , , , ,

December 12, 2007

CC Day T4 2007: Installing and Using Moodle

Posted in Moodle at 4:58 pm

This was very similar to a previous presentation given as part of the Tech KNOW Tour. However the Using Moodle presentation has some slight additions from Paul for a more technical audience and the spoken part of my presentation concentrated on a more technical side.

Some additional notes:

To use the DET mail server you can either add mail.det.nsw.edu.au to the mail section of your php.ini file or add it to the
Admin -> Server -> Email: SMTP Hosts section.
If you wish to restrict to sending to DET emails you can add following to the Allowed email domains : “education.nsw.gov.au det.nsw.edu.au“.
Make sure to test the mail server settings before adding any restrictions to domains.

If using Novell or Mac OS you will need to use a different LDAP browser as AD Explorer only works with Active Directory.
For Novell I usually use the free Windows program Softerra LDAP Browser (MSI).
There are a few Java based LDAP browsers that should work with Mac. A good Java based LDAP browser is JXplorer this should work on Mac, Windows and Linux. For some more info on Mac and LDAP look at this article on LDAP in Mac OS X Server from the Mac Dev Center, it is not fully applicable as it also has home drive mapping but it does contain some useful info.

Paul Ganderton has made his Geography HSC site avaliable for guests. You can also view some of the other course on our Moodle site. Look for this logo Guest Accesswhich means guest access is allowed.

Bulk Operations: Some people asked about bulk deletion of users and courses.
This section has been moved to Moodle: Bulk Deletion Operations.

Presentations:

Plugins used by Moodle

Some of the items shown during talk are produced by plugins to Moodle. Below is a list of some of our favourites:

  • Book: Allows structuring resource pages with chapters and pages.
  • Gallery: Shows slide shows and generates thumbnails of images. You can upload a zip file containing an entire folder structure of pictures, and auto-generate albums and sub-albums from it.
  • Course Menu: Creates a Tree Structure as a block on side of page to assist navigation.
  • Download: SBHS Moodle Library Block  SBHS Moodle Library Block (2.3 KiB, 221 hits)

    On the main SBHS Moodle page there is also a Library block that sends search queries to our Sentral library page. This will need to be customised by schools to point to their Sentral system or the new DET My Library system (only accessible inside DET WAN). Just modify the block_library.php file to point to your Library search page. To install place the library directory in your Moodle blocks folder.

Tags: , , , , , , , , , , , ,

December 3, 2007

Security Templates

Posted in Active Directory, Novell, Windows at 9:46 am

When using Group Policies with Zenworks and Windows XP you may find users are able to create folders and files in root of C:.
This is due to the change in default security settings for drives on Windows XP from 2000.

You need to use the Security Template editor to create a template restricting rights to the C drive and deploy it with your group policies. The same procedure can be used to create a Security Template for use with Active Directory.

Instructions:

Read the rest of this entry »

Tags: , , , , , , ,

November 20, 2007

AD Explorer

Posted in Active Directory, Utilities at 8:07 am

An LDAP browser for Active Directory. Makes it easy to see all attributes of objects and assists in configuring web applications that authenticate using LDAP.

http://www.microsoft.com/technet/sysinternals/Networking/AdExplorer.mspx

You can connect to your AD server without knowing any LDAP paths, just use your standard login.

Can also take snapshots to allow you to see what effect changes have on AD.

Another Great tool from Sysinternals

Tags: , ,

November 17, 2007

SysInternals Website

Posted in Utilities, Websites at 11:46 pm

A great site with a large collection of tools, everything from Active Directory Management and Monitoring through to security, process monitoring and funny screen savers.

http://www.sysinternals.com/

SysInternals was taken over by Microsoft so they also have new URL http://www.microsoft.com/technet/sysinternals/

Tags: , , , ,