Wednesday 2 January 2013

How to integrate OpenSIS with Joomla LDAP authentication

Whilst working with OpenSIS and Joomla for school intranets I have figured out a way to seamlessly integrate LDAP authentication in Joomla with OpenSIS.

Here is how it works:

A user which is logged in to Joomla can be automatically logged in to Opensis to see his /hers information.

This way you protect your users from password faigue and having to maintain several different username /password databases.

The integration automatically distinguishes between teacher / student / parent accounts.

OpenSIS want couple of thousand dollars for proper LDAP integration.
I am happy to help you for US $200.

To save on integration time, make sure of the following:
1. Working Joomla installation
2. Properly configured LDAP authentication within Joomla

If you don't use LDAP it may still work, after I give you the integration technique and necessary files.

If you're interested - drop me a line alexander AT lanos DOT co DOT uk

Saturday 8 September 2012

PHP Script How to split domain from e-mail


function getDomainFromEmail($email)
{
// Get the data after the @ sign
$domain = substr(strrchr($email, "@"), 1);

return $domain;
}

// Example

$email = 'the_username_here@yahoo.com';

$domain = getDomainFromEmail($email);

echo $domain; // yahoo.com
?>

How to add a UPN suffix with VBScript VBS


'----------Script configuration

Const ADS_PROPERTY_APPEND=3
strNewSuffix="test.com"
strDomain="domain.com"    'This must be the domain you're working with. If it is single domain - this is its name here

'----------End Script configuration

set objRootDSE =GetObject("LDAP://"&strDomain & "/RootDSE")
set objPartitions=GetObject("LDAP://cn=Partitions,"& _
                              objRootDSE.Get("ConfigurationNamingContext"))
objPartitions.PutEx ADS_PROPERTY_APPEND, "uPNSuffixes", Array(strNewSuffix)
objPartitions.SetInfo

How to setup NTP time sync in Windows Server 2008


The good news is: When configured correctly, you can use the Windows Time (W32Time) service as an SNTP/NTP server for both windows and non-windows SNTP/NTP clients.
Here's how to do it:
  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate and then click the following registry entry:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config\
  3. In the right pane, right-click AnnounceFlags, and then click Modify.
  4. In the Edit DWORD Value dialog box, under Value data, type 5, and then click OK.
  5. Enable NTPServer.
    1. Locate and then click the following registry subkey:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
                                                      Services\W32Time\TimeProviders\NtpServer\
    2. In the right pane, right-click Enabled, and then click Modify.
    3. In the Edit DWORD Value dialog box, type 1 under Value data, and then click OK.
  6. Exit Registry Editor.
  7. At the command prompt, type the following command to restart the Windows Time service, and then press ENTER:net stop w32time && net start w32time
This should get you setup with minimal registry hack impact.
Tips
  • Make sure W32Time is set to Automatic startup mode.
  • Make sure UDP 123 is allowed through your firewall.
  • Use this InternetTime program to help you debug connectivity to your SNTP/NTP server.

Windows 7 RDP how to hide remotely logged on users


  • Once you are logged into one of these editions of Windows 7, type "secpol.msc" into the start menu's search field and click on the first result, or type it into the Run dialog and hit Enter.
    Launch the Local Security Policy snap-in editor in Windows 7
  • This launches the "Local Security Policy" editor / snap-in; double-click on "Local Policies" to expand it, and select "Security Options". Then, scroll down until you find the entry labeled "Interactive logon: Do not display last user name", and double-click on it.

    This is a simple dialog which offers only two settings, "Disabled" being checked by default. Select "Enabled", and click on the "OK" button to apply the new setting (takes effect immediately).
    Hide usernames on Windows 7 logon screen
  • You can now test how the modified Windows 7 logon screen looks: hold down the Windows logo key and press "L" (as in Lock). Then, click on the "Switch user" button to see all other users, and all you'll see are two blank text fields for username and password, respectively.

Hide usernames on logon screen using the registry

If you have Windows 7 Home Premium / Basic or Windows 7 starter, here's how to enable the same setting using the registry. Type "regedit" in the start menu's search field, and click on the first result. Once the registry editor has opened, go to the following node (double-click on each to expand it).

HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Windows > CurrentVersion > Policies > System
Edit the "DontDisplayLastUserName" DWORD (create it if needed), and change its value to "1" to enable the feature, or "0" to disable it. The new setting also takes effect right away.
Disable usernames on Windows 7 welcome screen through registry

Windows 7 where is All users Dekstop and Start Menu folder


All users desktop:
C:\Users\Public\Desktop\
All users start menu:
C:\ProgramData\Microsoft\Windows\Start Menu\

How to install DropBox for all users in Windows 7 64-bit




when you install DropBox using “run as administrator” the program gets installed to the administrator profile and wouldn’t be available for other users on the system.

Follow below steps to make the application available for all users on the system:

  1. Copy the DropBox install folder “C:\Users\Administrator\AppData\LocalLow\Dropbox” to “C:\Program Files (x86)\DropBox” folder
  2. Create a shortcut in “C:\ProgramData\Microsoft\Windows\Start Menu\Programs\DropBox” folder to "C:\Program Files (x86)\DropBox\bin\Dropbox.exe"
  3. Copy the Shortcut to C:\Users\Public\Desktop folder as well to make it available to all users on their desktop
  4. when users launch the app they will be prompted to reconfigure app where they can specify their custom dropbox folder location